summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/lang-perl-1
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2005-02-15 14:48:11 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:12:16 +0200
commit5757f7f4d8493dfa34ece58e6bb3ae41f4e48224 (patch)
treeafcf361da8b10d937cc1810260f4f3d9cd6ee799 /gettext-tools/tests/lang-perl-1
parent8225187c2ae081bff8b081fe4cccb21b2fc1fc5d (diff)
downloadexternal_gettext-5757f7f4d8493dfa34ece58e6bb3ae41f4e48224.zip
external_gettext-5757f7f4d8493dfa34ece58e6bb3ae41f4e48224.tar.gz
external_gettext-5757f7f4d8493dfa34ece58e6bb3ae41f4e48224.tar.bz2
Perform the lang-* tests both in a traditional locale and in a UTF-8 locale,
as far as provided by the system.
Diffstat (limited to 'gettext-tools/tests/lang-perl-1')
-rwxr-xr-xgettext-tools/tests/lang-perl-125
1 files changed, 20 insertions, 5 deletions
diff --git a/gettext-tools/tests/lang-perl-1 b/gettext-tools/tests/lang-perl-1
index 8bdbd04..ccd2d85 100755
--- a/gettext-tools/tests/lang-perl-1
+++ b/gettext-tools/tests/lang-perl-1
@@ -57,7 +57,7 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
msgid "'Your command, please?', asked the waiter."
-msgstr "Votre commande, s'il vous plait, dit le gar�n."
+msgstr "«Votre commande, s'il vous plait», dit le garçon."
# Les gateaux allemands sont les meilleurs du monde.
#, perl-format
@@ -86,10 +86,15 @@ test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES
: ${MSGFMT=msgfmt}
${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po
-tmpfiles="$tmpfiles prog.ok prog.out"
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
-Votre commande, s'il vous plait, dit le gar�n.
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EUR remplace FF.
EOF
@@ -99,8 +104,18 @@ perl -e 'use Locale::Messages;' 2>/dev/null \
|| { rm -fr $tmpfiles; exit 77; }
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= perl program.pl > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= perl program.pl > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LANG=$LOCALE_FR_UTF8 LC_MESSAGES= LC_CTYPE= LC_ALL= perl program.pl > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles