git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lib-gettext.sh: Show GIT_INTERNAL_GETTEXT_SH_SCHEME = fallthrough
@ 2012-03-10 22:37 Torsten Bögershausen
  0 siblings, 0 replies; only message in thread
From: Torsten Bögershausen @ 2012-03-10 22:37 UTC (permalink / raw)
  To: avarab, gitster; +Cc: git, tboegi

The test cases for gettext, which are in this 3 files:
 t0204-gettext-reencode-sanity.sh
 t0200-gettext-basic.sh
 t0203-gettext-setlocale-sanity.sh

are only run when GETTEXT_LOCALE or GETTEXT_ISO_LOCALE
(depending on the test case) is set.

This variables are set up in lib-gettext.sh
The variables may not be set and the appropriate test cases are skipped
when either
 a) GIT_INTERNAL_GETTEXT_SH_SCHEME = fallthrough
or
 b) the needed locale is not available on the system.

Tell the user what which was the reason to skip the tests

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
 t/lib-gettext.sh |   44 +++++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 21 deletions(-)

diff --git a/t/lib-gettext.sh b/t/lib-gettext.sh
index 0f76f6c..aa401b1 100644
--- a/t/lib-gettext.sh
+++ b/t/lib-gettext.sh
@@ -28,28 +28,30 @@ then
 	# test can use it too
 	export is_IS_locale is_IS_iso_locale
 
-	if test -n "$is_IS_locale" &&
-		test $GIT_INTERNAL_GETTEXT_SH_SCHEME != "fallthrough"
+	if test "$GIT_INTERNAL_GETTEXT_SH_SCHEME" != fallthrough
 	then
-		# Some of the tests need the reference Icelandic locale
-		test_set_prereq GETTEXT_LOCALE
-
-		# Exporting for t0202/test.pl
-		GETTEXT_LOCALE=1
-		export GETTEXT_LOCALE
-		say "# lib-gettext: Found '$is_IS_locale' as an is_IS UTF-8 locale"
-	else
-		say "# lib-gettext: No is_IS UTF-8 locale available"
-	fi
-
-	if test -n "$is_IS_iso_locale" &&
-		test $GIT_INTERNAL_GETTEXT_SH_SCHEME != "fallthrough"
-	then
-		# Some of the tests need the reference Icelandic locale
-		test_set_prereq GETTEXT_ISO_LOCALE
-
-		say "# lib-gettext: Found '$is_IS_iso_locale' as an is_IS ISO-8859-1 locale"
+		if test -n "$is_IS_locale"
+		then
+			# Some of the tests need the reference Icelandic locale
+			test_set_prereq GETTEXT_LOCALE
+
+			# Exporting for t0202/test.pl
+			GETTEXT_LOCALE=1
+			export GETTEXT_LOCALE
+			say "# lib-gettext: Found '$is_IS_locale' as an is_IS UTF-8 locale"
+		else
+			say "# lib-gettext: No is_IS UTF-8 locale available"
+		fi
+
+		if test -n "$is_IS_iso_locale"
+		then
+			# Some of the tests need the reference Icelandic locale
+			test_set_prereq GETTEXT_ISO_LOCALE
+			say "# lib-gettext: Found '$is_IS_iso_locale' as an is_IS ISO-8859-1 locale"
+		else
+			say "# lib-gettext: No is_IS ISO-8859-1 locale available"
+		fi
 	else
-		say "# lib-gettext: No is_IS ISO-8859-1 locale available"
+		say "# GIT_INTERNAL_GETTEXT_SH_SCHEME = fallthrough"
 	fi
 fi
-- 
1.7.10.rc0.17.g74595.dirty

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-03-10 22:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-10 22:37 [PATCH] lib-gettext.sh: Show GIT_INTERNAL_GETTEXT_SH_SCHEME = fallthrough Torsten Bögershausen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).