From: Daiki Ueno Date: Thu, 15 May 2014 02:57:54 +0000 (+0900) Subject: tests: Don't assume ga_IE locale is present X-Git-Tag: v0.19~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=04ba4c730c81ac7bf26584cdad55b346e6308d1e;p=thirdparty%2Fgettext.git tests: Don't assume ga_IE locale is present * msginit-3: Fix charset value after msginit invocation. --- diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index dc357f939..51dacf865 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,7 @@ +2014-05-15 Daiki Ueno + + * msginit-3: Fix charset value after msginit invocation. + 2014-05-14 Daiki Ueno tests: Fix errors when CFLAGS contains --coverage diff --git a/gettext-tools/tests/msginit-3 b/gettext-tools/tests/msginit-3 index 7b9099b76..a20f28702 100755 --- a/gettext-tools/tests/msginit-3 +++ b/gettext-tools/tests/msginit-3 @@ -37,19 +37,23 @@ msgstr "" EOF : ${MSGINIT=msginit} -GETTEXTLIBDIR="$abs_top_srcdir"/src ${MSGINIT} -l ga_IE.utf8 --no-translator -o mi-test3.tmp 2>mi-test3.err +GETTEXTLIBDIR="$abs_top_srcdir"/src ${MSGINIT} -l ga_IE --no-translator -o mi-test3.tmp 2>mi-test3.err test $? = 0 || { cat mi-test3.err 1>&2; exit 1; } +grep -q "Project-Id-Version: gt-msginit " mi-test3.tmp || exit 1 + +# The charset stored in the header entry is the locale encoding of the gl_IE +# locale, which is system dependent, or ASCII if the locale does not exist. +# # Project-Id-Version contains version constructed from a temporary # directory name -grep -q "Project-Id-Version: gt-msginit " mi-test3.tmp || exit 1 -sed -e '1,10d' < mi-test3.tmp | grep -v Project-Id-Version | LC_ALL=C tr -d '\r' > mi-test3.out || exit 1 +sed -e '1,10d' -e 's/\(ISO-8859-1\|CP1252\|UTF-8\)/ASCII/g' < mi-test3.tmp | grep -v Project-Id-Version | LC_ALL=C tr -d '\r' > mi-test3.out || exit 1 cat <<\EOF > mi-test3.ok "Last-Translator: Automatically generated\n" "Language-Team: none\n" "Language: ga\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" +"Content-Type: text/plain; charset=ASCII\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n"