From: Junio C Hamano Date: Thu, 22 Dec 2011 19:27:25 +0000 (-0800) Subject: Merge branch 'jk/maint-do-not-feed-stdin-to-tests' X-Git-Tag: v1.7.9-rc0~28 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/52b9d2cf7fbde061bf0d3336e3a89d7333d5b23d?ds=inline;hp=-c Merge branch 'jk/maint-do-not-feed-stdin-to-tests' * jk/maint-do-not-feed-stdin-to-tests: test-lib: redirect stdin of tests --- 52b9d2cf7fbde061bf0d3336e3a89d7333d5b23d diff --combined t/test-lib.sh index 0e932dd975,a73a77b3b6..a65dfc7ea9 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@@ -44,7 -44,6 +44,7 @@@ export LANG LC_ALL PAGER TERM T EDITOR=: unset VISUAL unset EMAIL +unset LANGUAGE unset $(perl -e ' my @env = keys %ENV; my $ok = join("|", qw( @@@ -192,6 -191,7 +192,7 @@@ the fi exec 5>&1 + exec 6<&0 if test "$verbose" = "t" then exec 4>&2 3>&1 @@@ -380,11 -380,6 +381,11 @@@ test_config () git config "$@" } +test_config_global () { + test_when_finished "test_unconfig --global '$1'" && + git config --global "$@" +} + # Use test_set_prereq to tell that a particular prerequisite is available. # The prerequisite can later be checked for in two ways: # @@@ -475,7 -470,7 +476,7 @@@ test_debug () 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 &3 2>&4 "$*" } test_run_ () { @@@ -956,8 -951,6 +957,8 @@@ the do make_valgrind_symlink $file done + # special-case the mergetools loadables + make_symlink "$GIT_BUILD_DIR"/mergetools "$GIT_VALGRIND/bin/mergetools" OLDIFS=$IFS IFS=: for path in $PATH @@@ -1119,14 -1112,12 +1120,14 @@@ esa test -z "$NO_PERL" && test_set_prereq PERL test -z "$NO_PYTHON" && test_set_prereq PYTHON test -n "$USE_LIBPCRE" && test_set_prereq LIBPCRE +test -z "$NO_GETTEXT" && test_set_prereq GETTEXT # Can we rely on git's output in the C locale? if test -n "$GETTEXT_POISON" then GIT_GETTEXT_POISON=YesPlease export GIT_GETTEXT_POISON + test_set_prereq GETTEXT_POISON else test_set_prereq C_LOCALE_OUTPUT fi