summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Beyer <s-beyer@gmx.net>2008-07-12 15:47:51 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-07-13 20:21:08 (GMT)
commit5a26973025bce74782571844c7b8091d1cd7c405 (patch)
treeb7ded3306337e38d4818279ea7dfc58186b0a840
parenta9a3e82e6d0018ff42ec11fd9560c1ff47add824 (diff)
downloadgit-5a26973025bce74782571844c7b8091d1cd7c405.zip
git-5a26973025bce74782571844c7b8091d1cd7c405.tar.gz
git-5a26973025bce74782571844c7b8091d1cd7c405.tar.bz2
t/test-lib.sh: exit with small negagive int is ok with test_must_fail
The test_must_fail function in test-lib.sh has been designed to distinguish segmentation faults from controlled errors. But in the current implementation this only works if a git command does not return a small negative value, like -1, -2 or -3. But some git commands do. Because any signal (like SIGSEGV) will result in an exit status less than 193, this patch just adds a further check for the exit status. Signed-off-by: Stephan Beyer <s-beyer@gmx.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--t/test-lib.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 8e2849b..11c0275 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -379,7 +379,7 @@ test_external_without_stderr () {
test_must_fail () {
"$@"
- test $? -gt 0 -a $? -le 129
+ test $? -gt 0 -a $? -le 129 -o $? -gt 192
}
# test_cmp is a helper function to compare actual and expected output.