git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] lib-gettext.sh: Show GIT_INTERNAL_GETTEXT_SH_SCHEME = fallthrough

From
Torsten Bögershausen <tboegi@web.de>
Date
Mar 10, 2012, 22:37 UTC
Message-ID
<201203102337.16260.tboegi@web.de>
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
Message 1 of 1 in “lib-gettext.sh: Show GIT_INTERNAL_GETTEXT_SH_SCHEME = fallthrough”
  1. lib-gettext.sh: Show GIT_INTERNAL_GETTEXT_SH_SCHEME = fallthroughTorsten Bögershausen, Mar 10, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.