]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t3070: make chain lint tester happy
authorMichael J Gruber <git@grubix.eu>
Fri, 24 Mar 2023 22:17:11 +0000 (23:17 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 28 Mar 2023 00:02:38 +0000 (17:02 -0700)
1f2e05f0b7 ("wildmatch: fix exponential behavior", 2023-03-20)
introduced a new test with a background process. Backgrounding
necessarily gives a result of 0, so that a seemingly broken && chain is
not really broken.

Adjust t3070 slightly so that our chain lint test recognizes the
construct for what it is and does not raise a false positive.

Signed-off-by: Michael J Gruber <git@grubix.eu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3070-wildmatch.sh

index b91a7cb7128a0caf542e5983a5545e00c9168f1f..4dd42df38c25615e0833b754d1a2c3132ef0bf1d 100755 (executable)
@@ -432,10 +432,12 @@ match 0 1 0 1 'z' '[Z-y]'
 match 1 1 1 1 'Z' '[Z-y]'
 
 test_expect_success 'matching does not exhibit exponential behavior' '
-       test-tool wildmatch wildmatch \
-               aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab \
-               "*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a" &
-       pid=$! &&
+       {
+               test-tool wildmatch wildmatch \
+                       aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab \
+                       "*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a*a" &
+               pid=$!
+       } &&
        sleep 2 &&
        ! kill $!
 '