From: SZEDER Gábor Date: Mon, 5 Aug 2019 08:02:38 +0000 (+0200) Subject: t5318-commit-graph: use 'test_expect_code' X-Git-Tag: v2.24.0-rc0~166^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9916073be5dc59997e7cb9f7577bc7c91fd8f44a;p=thirdparty%2Fgit.git 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 Acked-by: Derrick Stolee Signed-off-by: Junio C Hamano --- diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh index 22cb9d6643..4391007f4c 100755 --- a/t/t5318-commit-graph.sh +++ b/t/t5318-commit-graph.sh @@ -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 stderr; ret=$?; } && - test "$ret" = 1 && + test_expect_code 1 git commit-graph write --stdin-packs stderr && test_i18ngrep "error adding pack" stderr '