git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: avarab@gmail.com, gitster@pobox.com
Cc: git@vger.kernel.org, tboegi@web.de
Subject: [PATCH] lib-gettext.sh: Show GIT_INTERNAL_GETTEXT_SH_SCHEME = fallthrough
Date: Sat, 10 Mar 2012 23:37:14 +0100	[thread overview]
Message-ID: <201203102337.16260.tboegi@web.de> (raw)

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

                 reply	other threads:[~2012-03-10 22:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201203102337.16260.tboegi@web.de \
    --to=tboegi@web.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).