aboutsummaryrefslogtreecommitdiffstats
path: root/t/t0003-attributes.sh
diff options
context:
space:
mode:
authorKarthik Nayak <karthik.188@gmail.com>2023-01-14 09:30:37 +0100
committerJunio C Hamano <gitster@pobox.com>2023-01-14 08:49:55 -0800
commitc847e8c228a7820f11ce66d82dc68cd2241af031 (patch)
tree278a5767e58bbf500ea99368b7d712c4c77beb48 /t/t0003-attributes.sh
parentThe fourth batch (diff)
downloadgit-c847e8c228a7820f11ce66d82dc68cd2241af031.tar.gz
git-c847e8c228a7820f11ce66d82dc68cd2241af031.zip
t0003: move setup for `--all` into new block
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>
Diffstat (limited to 't/t0003-attributes.sh')
-rwxr-xr-xt/t0003-attributes.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/t/t0003-attributes.sh b/t/t0003-attributes.sh
index f7ee2f2ff0..b3aabb8aa3 100755
--- a/t/t0003-attributes.sh
+++ b/t/t0003-attributes.sh
@@ -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