Code

Merge branch 'gp/gitweb'
[git.git] / t / test-lib.sh
index 268b26c959692f8f575fb088143a92c4785b1214..7c2a8ba77d312c3196767969a39687bfb12f74c9 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.
@@ -396,7 +396,12 @@ fi
 
 # Test repository
 test=trash
-rm -fr "$test"
+rm -fr "$test" || {
+       trap - exit
+       echo >&5 "FATAL: Cannot prepare test area"
+       exit 1
+}
+
 test_create_repo $test
 cd "$test"