Skip to content

Commit c847e8c

Browse files
KarthikNayakgitster
authored andcommitted
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 <[email protected]> Co-authored-by: [email protected] Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2b4f5a4 commit c847e8c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

t/t0003-attributes.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,12 @@ test_expect_success 'attribute test: read paths from stdin' '
203203
test_cmp expect actual
204204
'
205205

206-
test_expect_success 'attribute test: --all option' '
206+
test_expect_success 'setup --all option' '
207207
grep -v unspecified <expect-all | sort >specified-all &&
208-
sed -e "s/:.*//" <expect-all | uniq >stdin-all &&
208+
sed -e "s/:.*//" <expect-all | uniq >stdin-all
209+
'
210+
211+
test_expect_success 'attribute test: --all option' '
209212
git check-attr --stdin --all <stdin-all >tmp &&
210213
sort tmp >actual &&
211214
test_cmp specified-all actual

0 commit comments

Comments
 (0)