[PATCH] t3070: make chain lint tester happy
- From
Michael J Gruber <git@grubix.eu>
- Date
- Mar 24, 2023, 22:17 UTC
- Message-ID
- <3714ba2f6528c38eb9c438126316a08b0cefca7c.1679696180.git.git@grubix.eu>
- In-Reply-To
- <13accf6f99d367d137eefd02e3f6bf05bf099e00.1679328580.git.phillip.wood@dunelm.org.uk>
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 list test recognizes the construct for what it is and does not raise a false positive.
Signed-off-by: Michael J Gruber <git@grubix.eu> --- t/t3070-wildmatch.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/t/t3070-wildmatch.sh b/t/t3070-wildmatch.sh index b91a7cb712..4dd42df38c 100755 --- a/t/t3070-wildmatch.sh +++ b/t/t3070-wildmatch.sh @@ -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 $! '
-- 2.40.0.355.gd681773fb6