]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t0003: move setup for `--all` into new block
authorKarthik Nayak <karthik.188@gmail.com>
Sat, 14 Jan 2023 08:30:37 +0000 (09:30 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 14 Jan 2023 16:49:55 +0000 (08:49 -0800)
There is some setup code which is used by multiple tests being setup in
`attribute test: --all option`. This means when we run "sh
./t0003-attributes.sh --run=setup,<num>" there is a chance of failing
since we missed this setup block.

So to ensure that setups are independent of test logic, move this to a
new setup block.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Co-authored-by: toon@iotcl.com
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0003-attributes.sh

index f7ee2f2ff0e6ee3be99ecd4d545c376963653482..b3aabb8aa32e3f7377e7a959d6f3503742e2c82e 100755 (executable)
@@ -203,9 +203,12 @@ test_expect_success 'attribute test: read paths from stdin' '
        test_cmp expect actual
 '
 
-test_expect_success 'attribute test: --all option' '
+test_expect_success 'setup --all option' '
        grep -v unspecified <expect-all | sort >specified-all &&
-       sed -e "s/:.*//" <expect-all | uniq >stdin-all &&
+       sed -e "s/:.*//" <expect-all | uniq >stdin-all
+'
+
+test_expect_success 'attribute test: --all option' '
        git check-attr --stdin --all <stdin-all >tmp &&
        sort tmp >actual &&
        test_cmp specified-all actual