From: Ævar Arnfjörð Bjarmason Date: Mon, 30 Aug 2010 21:10:53 +0000 (+0000) Subject: gettext tests: test message re-encoding under C X-Git-Tag: ko-pu~10^2~136 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=66d51530a631fd6d73e54633e78a94903e23ff0a;p=git.git gettext tests: test message re-encoding under C 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 --- 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