From: Karl Hasselström Date: Thu, 24 Jul 2008 20:46:56 +0000 (+0200) Subject: Test for exit code with command_error() X-Git-Tag: v0.15-rc1~198 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/stgit/commitdiff_plain/145fa2143eb508e8c6b36740bd475c23a780cf55 Test for exit code with command_error() The helper function was made for occasions such as this, so use it. Signed-off-by: Karl Hasselström --- diff --git a/t/t1300-uncommit.sh b/t/t1300-uncommit.sh index a906d13..a657ead 100755 --- a/t/t1300-uncommit.sh +++ b/t/t1300-uncommit.sh @@ -79,7 +79,7 @@ test_expect_success \ ' test_expect_success 'Uncommit a commit with not precisely one parent' ' - stg uncommit -n 5 ; [ $? = 2 ] && + command_error stg uncommit -n 5 && [ "$(echo $(stg series))" = "" ] '