Thread (44 messages) flat view 44 messages, 5 authors, 2016-06-15
STALE3733d

[PATCH/RFC 17/17] gettext tests: test message re-encoding under C

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:24
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help