OSDN Git Service

test_must_fail: 129 is a valid error code from usage()
authorJunio C Hamano <gitster@pobox.com>
Tue, 25 Mar 2008 06:07:08 +0000 (23:07 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 27 Mar 2008 19:13:39 +0000 (12:13 -0700)
When a git command is run under test_must_fail to make sure that
the argument parser catches bogus command line, it exits with 129.
We need to catch it as a valid "graceful error exit".

Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh

index 870b255..7c2a8ba 100644 (file)
@@ -300,7 +300,7 @@ test_expect_code () {
 
 test_must_fail () {
        "$@"
-       test $? -gt 0 -a $? -le 128
+       test $? -gt 0 -a $? -le 129
 }
 
 # test_cmp is a helper function to compare actual and expected output.