Skip to content

Commit 9916073

Browse files
szedergitster
authored andcommitted
t5318-commit-graph: use 'test_expect_code'
In 't5318-commit-graph.sh' the test 'close with correct error on bad input' manually verifies the exit code of a 'git commit-graph write' command. Use 'test_expect_code' instead. Signed-off-by: SZEDER Gábor <[email protected]> Acked-by: Derrick Stolee <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7c20df8 commit 9916073

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

t/t5318-commit-graph.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ test_expect_success 'write graph with no packs' '
2626
test_expect_success 'close with correct error on bad input' '
2727
cd "$TRASH_DIRECTORY/full" &&
2828
echo doesnotexist >in &&
29-
{ git commit-graph write --stdin-packs <in 2>stderr; ret=$?; } &&
30-
test "$ret" = 1 &&
29+
test_expect_code 1 git commit-graph write --stdin-packs <in 2>stderr &&
3130
test_i18ngrep "error adding pack" stderr
3231
'
3332

0 commit comments

Comments
 (0)