diff --git a/t/test-lib.sh b/t/test-lib.sh
index 0e932dd9758f71cbc95c6ab20f7c11e9056d7826..a089a188641f47a24e9018d852a3089aaf47d345 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
fi
exec 5>&1
+exec 6<&0
if test "$verbose" = "t"
then
exec 4>&2 3>&1
git config "$@"
}
+
test_config_global () {
test_when_finished "test_unconfig --global '$1'" &&
git config --global "$@"
}
+write_script () {
+ {
+ echo "#!${2-"$SHELL_PATH"}" &&
+ cat
+ } >"$1" &&
+ chmod +x "$1"
+}
+
# Use test_set_prereq to tell that a particular prerequisite is available.
# The prerequisite can later be checked for in two ways:
#
test_eval_ () {
# This is a separate function because some tests use
# "return" to end a test_expect_success block early.
- eval >&3 2>&4 "$*"
+ eval </dev/null >&3 2>&4 "$*"
}
test_run_ () {