Code

gettext tests: skip lib-gettext.sh tests under GETTEXT_POISON
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 4 Sep 2010 21:28:15 +0000 (21:28 +0000)
committerÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Sat, 30 Oct 2010 07:10:06 +0000 (07:10 +0000)
Change the gettext tests (all of whom use lib-gettext.sh) to skip
under GETTEXT_POISON=YesPlease. We also print a message to this
effect.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
t/lib-gettext.sh

index f0cdd3da931f52251e37f0fafa69aac419e92302..ced175c53fc7ccb305a555f28b14fcb434b359f1 100644 (file)
@@ -11,7 +11,7 @@ export GIT_TEXTDOMAINDIR GIT_PO_PATH
 
 . "$GIT_BUILD_DIR"/git-sh-i18n
 
-if test_have_prereq GETTEXT
+if test_have_prereq GETTEXT && test_have_prereq NO_GETTEXT_POISON
 then
        # is_IS.UTF-8 on Solaris and FreeBSD, is_IS.utf8 on Debian
        is_IS_locale=$(locale -a | sed -n '/^is_IS\.[uU][tT][fF]-*8$/{
@@ -38,5 +38,11 @@ then
 else
        # Only run some tests when we don't have gettext support
        test_set_prereq NO_GETTEXT
-       say "# lib-gettext: No GETTEXT support available"
+
+       if test_have_prereq NO_GETTEXT_POISON
+       then
+               say "# lib-gettext: GETTEXT_POISON defined, can't test gettext"
+       else
+               say "# lib-gettext: No GETTEXT support available"
+       fi
 fi