X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ftest-lib.sh;h=a65dfc7ea93b3ec95e6ab7cd5b758029fe599d22;hb=21c6a18c75cb48aaedffa6c95d6ff0076ffc6e1e;hp=bdd9513b84301275330d3dd7e49af05081ef9cd7;hpb=3686aa1caf907d22fe318c28efe93f0e7870ba50;p=git.git diff --git a/t/test-lib.sh b/t/test-lib.sh index bdd9513b8..a65dfc7ea 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -44,6 +44,7 @@ export LANG LC_ALL PAGER TERM TZ EDITOR=: unset VISUAL unset EMAIL +unset LANGUAGE unset $(perl -e ' my @env = keys %ENV; my $ok = join("|", qw( @@ -191,6 +192,7 @@ then fi exec 5>&1 +exec 6<&0 if test "$verbose" = "t" then exec 4>&2 3>&1 @@ -379,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: # @@ -469,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_ () { @@ -1113,12 +1120,14 @@ esac 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