Skip to content

Commit

Permalink
t5318-commit-graph: use 'test_expect_code'
Browse files Browse the repository at this point in the history
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 <szeder.dev@gmail.com>
Acked-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
szeder authored and gitster committed Aug 5, 2019
1 parent 7c20df8 commit 9916073
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions t/t5318-commit-graph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ test_expect_success 'write graph with no packs' '
test_expect_success 'close with correct error on bad input' '
cd "$TRASH_DIRECTORY/full" &&
echo doesnotexist >in &&
{ git commit-graph write --stdin-packs <in 2>stderr; ret=$?; } &&
test "$ret" = 1 &&
test_expect_code 1 git commit-graph write --stdin-packs <in 2>stderr &&
test_i18ngrep "error adding pack" stderr
'

Expand Down

0 comments on commit 9916073

Please sign in to comment.