From 66d51530a631fd6d73e54633e78a94903e23ff0a Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 30 Aug 2010 21:10:53 +0000 Subject: [PATCH] gettext tests: test message re-encoding under C MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Add tests for message re-encoding under C. Unlike the Shell tests these tests will break under GNU libintl if the recent patch to gettext.c is reverted. So this serves as a regression test for that issue. Signed-off-by: Ævar Arnfjörð Bjarmason --- t/t0204-gettext-reencode-sanity.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/t/t0204-gettext-reencode-sanity.sh b/t/t0204-gettext-reencode-sanity.sh index 1a7ea37e8..189af90c0 100755 --- a/t/t0204-gettext-reencode-sanity.sh +++ b/t/t0204-gettext-reencode-sanity.sh @@ -61,4 +61,18 @@ test_expect_success GETTEXT_ISO_LOCALE 'gettext: Fetching a UTF-8 msgid -> ISO-8 grep "$(echo tvöfaldar | iconv -f UTF-8 -t ISO8859-1)" actual ' +test_expect_success GETTEXT_LOCALE 'gettext.c: git init UTF-8 -> UTF-8' ' + printf "Bjó til tóma Git lind" >expect && + LANGUAGE=is LC_ALL="$is_IS_locale" git init repo >actual && + test_when_finished "rm -rf repo" && + grep "^$(cat expect) " actual +' + +test_expect_success GETTEXT_ISO_LOCALE 'gettext.c: git init UTF-8 -> ISO-8859-1' ' + printf "Bjó til tóma Git lind" >expect && + LANGUAGE=is LC_ALL="$is_IS_iso_locale" git init repo >actual && + test_when_finished "rm -rf repo" && + grep "^$(cat expect | iconv -f UTF-8 -t ISO8859-1) " actual +' + test_done -- 2.30.2