#
# Writing "git config --unset all.configuration || :" would be wrong,
# because we want to notice if it fails due to segv.
+#
+# Accepts the same options as test_must_fail.
test_might_fail () {
- test_must_fail ok=success "$@"
- }
+ test_must_fail ok=success "$@" 2>&7
+ } 7>&2 2>&4
# Similar to test_must_fail and test_might_fail, but check that a
# given command exited with a given exit code. Meant to be used as:
return 0
fi
- echo >&2 "test_expect_code: command exited with $exit_code, we wanted $want_code $*"
+ echo >&4 "test_expect_code: command exited with $exit_code, we wanted $want_code $*"
return 1
- }
+ } 7>&2 2>&4
# test_cmp is a helper function to compare actual and expected output.
# You can use it like: