[PATCH/RFC 17/17] gettext tests: test message re-encoding under C
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Aug 30, 2010, 21:28 UTC
- Message-ID
- <1283203703-26923-18-git-send-email-avarab@gmail.com>
- In-Reply-To
- <1283203703-26923-1-git-send-email-avarab@gmail.com>
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 <avarab@gmail.com> --- t/t0204-gettext-reencode-sanity.sh | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-)
diff --git a/t/t0204-gettext-reencode-sanity.sh b/t/t0204-gettext-reencode-sanity.sh index 1a7ea37..189af90 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
-- 1.7.2.2.536.g3f548