chiark / gitweb /
Test for exit code with command_error()
[stgit] / t / t1300-uncommit.sh
index 0d952a77178694c66fef3502173168d74480fe72..a657ead7ed06b7264045a4bd1cefac7570bdbde9 100755 (executable)
@@ -78,8 +78,8 @@ test_expect_success \
     stg commit --all
 '
 
-test_expect_failure 'Uncommit a commit with not precisely one parent' '
-    stg uncommit -n 5 ; [ $? = 2 ] &&
+test_expect_success 'Uncommit a commit with not precisely one parent' '
+    command_error stg uncommit -n 5  &&
     [ "$(echo $(stg series))" = "" ]
 '