diff options
Diffstat (limited to 'gettext-tools/tests/lang-perl-2')
-rwxr-xr-x | gettext-tools/tests/lang-perl-2 | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/gettext-tools/tests/lang-perl-2 b/gettext-tools/tests/lang-perl-2 index f9868b2..940aaee 100755 --- a/gettext-tools/tests/lang-perl-2 +++ b/gettext-tools/tests/lang-perl-2 @@ -85,21 +85,36 @@ 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ç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 # Test for perl with libintl-perl package. perl -M'Locale::TextDomain' -e '' 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 |