Skip to content

Commit 195eb46

Browse files
peffgitster
authored andcommitted
t5613: use test_must_fail
Besides being our normal style, this correctly checks for an error exit() versus signal death. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b28a88f commit 195eb46

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

t/t5613-info-alternate.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ git clone -l -s F G &&
4646
git clone --bare -l -s G H'
4747

4848
test_expect_success 'invalidity of deepest repository' \
49-
'cd H && {
50-
git fsck
51-
test $? -ne 0
52-
}'
49+
'cd H &&
50+
test_must_fail git fsck
51+
'
5352

5453
cd "$base_dir"
5554

@@ -75,7 +74,8 @@ cd "$base_dir"
7574
test_expect_success 'that info/alternates is necessary' \
7675
'cd C &&
7776
rm -f .git/objects/info/alternates &&
78-
! (git fsck)'
77+
test_must_fail git fsck
78+
'
7979

8080
cd "$base_dir"
8181

@@ -89,7 +89,7 @@ cd "$base_dir"
8989
test_expect_success \
9090
'that relative alternate is only possible for current dir' '
9191
cd D &&
92-
! (git fsck)
92+
test_must_fail git fsck
9393
'
9494

9595
cd "$base_dir"

0 commit comments

Comments
 (0)