git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Torsten Bögershausen" <tboegi@web.de>
To: git@vger.kernel.org, avarab@gmail.com
Cc: tboegi@web.de
Subject: [PATCH/RFC] Change t0204-gettext-reencode-sanity.sh to pass under Mac OSX
Date: Mon, 5 Mar 2012 20:39:15 +0100	[thread overview]
Message-ID: <201203052039.16893.tboegi@web.de> (raw)

t0204 tries to use a ISO-8859-1 locale and expects that characters
outside the ISO-8859-1 code range are converted in "question marks".

The gettext under Mac OS X ignores the ISO-8859-1 locale and uses
UTF-8 anyway.

Fixed even whitespace in this very test case.

Let the test pass when UTF-8 is returned.

Signed-off-by: Torsten Bögershausen <tboegi@web.de>
---
 This is a suggestion to make t0204--gettext-reencode-sanity.sh to pass under Mac OSX
 The tests checks if unicode characters outside ISO-8859-1 are converted into '?'.
 The Mac OS X version of gettext does not seem to support ISO-8859-1 at all.
 Even if we set the locale to ISO-8859-1, UTF-8 is used anyway.


 t/t0204-gettext-reencode-sanity.sh |   16 +++++++++++-----
 1 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/t/t0204-gettext-reencode-sanity.sh b/t/t0204-gettext-reencode-sanity.sh
index 189af90..78f0889 100755
--- a/t/t0204-gettext-reencode-sanity.sh
+++ b/t/t0204-gettext-reencode-sanity.sh
@@ -27,16 +27,22 @@ test_expect_success GETTEXT_ISO_LOCALE 'gettext: Emitting ISO-8859-1 from our UT
 '
 
 test_expect_success GETTEXT_ISO_LOCALE 'gettext: Emitting ISO-8859-1 from our UTF-8 *.mo files / Runes' '
-    LANGUAGE=is LC_ALL="$is_IS_iso_locale" gettext "TEST: Old English Runes" >runes &&
+	LANGUAGE=is LC_ALL="$is_IS_iso_locale" gettext "TEST: Old English Runes" >runes &&
 
 	if grep "^TEST: Old English Runes$" runes
 	then
 		say "Your system can not handle this complexity and returns the string as-is"
 	else
-		# Both Solaris and GNU libintl will return this stream of
-		# question marks, so it is s probably portable enough
-		printf "TILRAUN: ?? ???? ??? ?? ???? ?? ??? ????? ??????????? ??? ?? ????" >runes-expect &&
-		test_cmp runes-expect runes
+		if grep "^TILRAUN: ᚻᛖ ᚳᚹᚫᚦ ᚦᚫᛏ ᚻᛖ ᛒᚢᛞᛖ ᚩᚾ ᚦᚫᛗ ᛚᚪᚾᛞᛖ ᚾᚩᚱᚦᚹᛖᚪᚱᛞᚢᛗ ᚹᛁᚦ ᚦᚪ ᚹᛖᛥᚫ" runes
+		then
+			# Mac OS supports only UTF-8, even if we want ISO-8859-1 we get UTF-8
+			say "Your system handles only utf-8"
+		else
+			# Both Solaris and GNU libintl will return this stream of
+			# question marks, so it is s probably portable enough
+			printf "TILRAUN: ?? ???? ??? ?? ???? ?? ??? ????? ??????????? ??? ?? ????" >runes-expect &&
+			test_cmp runes-expect runes
+		fi
 	fi
 '
 
-- 
1.7.9.rc2

             reply	other threads:[~2012-03-05 19:39 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-05 19:39 Torsten Bögershausen [this message]
2012-03-05 20:39 ` [PATCH/RFC] Change t0204-gettext-reencode-sanity.sh to pass under Mac OSX Junio C Hamano
2012-03-07 21:03   ` Ævar Arnfjörð Bjarmason
2012-03-07 21:34     ` Junio C Hamano
2012-03-07 21:43       ` Ævar Arnfjörð Bjarmason
2012-03-07 21:58         ` Junio C Hamano
2012-03-07 22:04           ` Ævar Arnfjörð Bjarmason
2012-03-07 23:36             ` Junio C Hamano
2012-03-07 23:42               ` Junio C Hamano
2012-03-08  5:54               ` Torsten Bögershausen
2012-03-08  7:23                 ` Johannes Sixt
2012-03-08  9:21                   ` Torsten Bögershausen
2012-03-08 12:07                     ` Torsten Bögershausen
2012-03-09 22:30               ` Re*: " Junio C Hamano
2012-03-10 22:28                 ` Torsten Bögershausen
2012-03-11  6:36                   ` Junio C Hamano
2012-03-11 15:11                   ` Torsten Bögershausen
2012-03-11 19:22                     ` Junio C Hamano
2012-03-11 21:10                       ` Torsten Bögershausen
2012-03-11 21:38                         ` Junio C Hamano
2012-03-12 20:58                           ` Torsten Bögershausen
2012-03-12 21:25                             ` Junio C Hamano
2012-03-13 19:19                               ` Torsten Bögershausen
2012-03-13 19:32                                 ` Junio C Hamano
2012-03-12  5:46                     ` Junio C Hamano

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=201203052039.16893.tboegi@web.de \
    --to=tboegi@web.de \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    /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).