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.
# 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"