summaryrefslogtreecommitdiff
path: root/t/test-lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/test-lib.sh')
-rw-r--r--t/test-lib.sh22
1 files changed, 17 insertions, 5 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 897e6fc..edee38a 100644
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
@@ -95,6 +95,16 @@ PAGER=cat
TZ=UTC
export LANG LC_ALL PAGER TZ
EDITOR=:
+
+# GIT_TEST_GETTEXT_POISON should not influence git commands executed
+# during initialization of test-lib and the test repo. Back it up,
+# unset and then restore after initialization is finished.
+if test -n "$GIT_TEST_GETTEXT_POISON"
+then
+ GIT_TEST_GETTEXT_POISON_ORIG=$GIT_TEST_GETTEXT_POISON
+ unset GIT_TEST_GETTEXT_POISON
+fi
+
# A call to "unset" with no arguments causes at least Solaris 10
# /usr/xpg4/bin/sh and /bin/ksh to bail out. So keep the unsets
# deriving from the command substitution clustered with the other
@@ -1104,13 +1114,15 @@ test -n "$USE_LIBPCRE1" && test_set_prereq LIBPCRE1
test -n "$USE_LIBPCRE2" && test_set_prereq LIBPCRE2
test -z "$NO_GETTEXT" && test_set_prereq GETTEXT
+if test -n "$GIT_TEST_GETTEXT_POISON_ORIG"
+then
+ GIT_TEST_GETTEXT_POISON=$GIT_TEST_GETTEXT_POISON_ORIG
+ unset GIT_TEST_GETTEXT_POISON_ORIG
+fi
+
# Can we rely on git's output in the C locale?
-if test -n "$GETTEXT_POISON"
+if test -z "$GIT_TEST_GETTEXT_POISON"
then
- GIT_GETTEXT_POISON=YesPlease
- export GIT_GETTEXT_POISON
- test_set_prereq GETTEXT_POISON
-else
test_set_prereq C_LOCALE_OUTPUT
fi