summaryrefslogtreecommitdiff
path: root/t/t5318-commit-graph.sh
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2019-08-05 08:02:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-08-05 21:30:59 (GMT)
commit9916073be5dc59997e7cb9f7577bc7c91fd8f44a (patch)
tree360ca7426a35dec6b48772f70057de1197ead7db /t/t5318-commit-graph.sh
parent7c20df84bd21ec0215358381844274fa10515017 (diff)
downloadgit-9916073be5dc59997e7cb9f7577bc7c91fd8f44a.zip
git-9916073be5dc59997e7cb9f7577bc7c91fd8f44a.tar.gz
git-9916073be5dc59997e7cb9f7577bc7c91fd8f44a.tar.bz2
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 <szeder.dev@gmail.com> Acked-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5318-commit-graph.sh')
-rwxr-xr-xt/t5318-commit-graph.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/t/t5318-commit-graph.sh b/t/t5318-commit-graph.sh
index 22cb9d6..4391007 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 <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
'