summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests
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
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')
-rw-r--r--gettext-tools/tests/ChangeLog26
-rw-r--r--gettext-tools/tests/Makefile.am1
-rwxr-xr-xgettext-tools/tests/lang-bash53
-rwxr-xr-xgettext-tools/tests/lang-c34
-rwxr-xr-xgettext-tools/tests/lang-c++34
-rwxr-xr-xgettext-tools/tests/lang-clisp48
-rwxr-xr-xgettext-tools/tests/lang-csharp48
-rwxr-xr-xgettext-tools/tests/lang-gawk59
-rwxr-xr-xgettext-tools/tests/lang-guile48
-rwxr-xr-xgettext-tools/tests/lang-java48
-rwxr-xr-xgettext-tools/tests/lang-librep47
-rwxr-xr-xgettext-tools/tests/lang-objc34
-rwxr-xr-xgettext-tools/tests/lang-pascal28
-rwxr-xr-xgettext-tools/tests/lang-perl-125
-rwxr-xr-xgettext-tools/tests/lang-perl-221
-rwxr-xr-xgettext-tools/tests/lang-php47
-rwxr-xr-xgettext-tools/tests/lang-python-124
-rwxr-xr-xgettext-tools/tests/lang-python-225
-rwxr-xr-xgettext-tools/tests/lang-sh47
-rwxr-xr-xgettext-tools/tests/lang-smalltalk22
-rwxr-xr-xgettext-tools/tests/lang-tcl20
21 files changed, 588 insertions, 151 deletions
diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog
index f8522fa..46e03a2 100644
--- a/gettext-tools/tests/ChangeLog
+++ b/gettext-tools/tests/ChangeLog
@@ -1,3 +1,29 @@
+2005-02-13 Bruno Haible <bruno@clisp.org>
+
+ * Makefile.am (TESTS_ENVIRONMENT): Define also the environment variable
+ LOCALE_FR_UTF8.
+ * lang-bash: Don't test using the traditional french locale if it does
+ exist. Try not only the traditional french locale, but also the UTF-8
+ locale, if it exists.
+ * lang-c: Likewise.
+ * lang-c++: Likewise.
+ * lang-clisp: Likewise.
+ * lang-csharp: Likewise.
+ * lang-gawk: Likewise.
+ * lang-guile: Likewise.
+ * lang-java: Likewise.
+ * lang-librep: Likewise.
+ * lang-objc: Likewise.
+ * lang-perl-1: Likewise.
+ * lang-perl-2: Likewise.
+ * lang-php: Likewise.
+ * lang-sh: Likewise.
+ * lang-smalltalk: Likewise.
+ * lang-tcl: Likewise.
+ * lang-pascal: Likewise, but disable the test of the UTF-8 locale.
+ * lang-python-1: Likewise.
+ * lang-python-2: Likewise.
+
2005-02-12 Bruno Haible <bruno@clisp.org>
* lang-clisp: Use only the first line of "clisp --version"'s output.
diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am
index 80d79b4..5d46103 100644
--- a/gettext-tools/tests/Makefile.am
+++ b/gettext-tools/tests/Makefile.am
@@ -149,6 +149,7 @@ TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) \
TESTCSHARP='@TESTCSHARP@' \
TESTLIBASPRINTF='@TESTLIBASPRINTF@' \
LOCALE_FR='@LOCALE_FR@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
host_os='@host_os@' \
CONFIG_SHELL='$(SHELL)' \
$(SHELL)
diff --git a/gettext-tools/tests/lang-bash b/gettext-tools/tests/lang-bash
index 0fff7e3..f9397b0 100755
--- a/gettext-tools/tests/lang-bash
+++ b/gettext-tools/tests/lang-bash
@@ -89,16 +89,30 @@ case `bash -c 'echo $BASH_VERSION'` in
*) rm -fr $tmpfiles; exit 77;;
esac
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.nok prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+tmpfiles="$tmpfiles prog.nok prog.ok prog.oku prog.out"
# Expected result when bash is built without i18n support.
cat <<\EOF > prog.nok
'Your command, please?', asked the waiter.
@@ -109,12 +123,25 @@ cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
2 morceaux de gateau
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR bash ./prog.sh 2 > prog.out || exit 1
-: ${DIFF=diff}
-${DIFF} prog.nok prog.out > /dev/null && { rm -fr $tmpfiles; exit 77; }
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR bash ./prog.sh 2 > prog.out || exit 1
+ : ${DIFF=diff}
+ ${DIFF} prog.nok prog.out > /dev/null && { rm -fr $tmpfiles; exit 77; }
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 bash ./prog.sh 2 > prog.out || exit 1
+ : ${DIFF=diff}
+ ${DIFF} prog.nok prog.out > /dev/null && { rm -fr $tmpfiles; exit 77; }
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/lang-c b/gettext-tools/tests/lang-c
index 90ac388..21f1907 100755
--- a/gettext-tools/tests/lang-c
+++ b/gettext-tools/tests/lang-c
@@ -113,22 +113,40 @@ 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
: ${LOCALE_FR=fr_FR}
-LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
+ case $? in
+ 0) ${DIFF} prog.ok prog.out || exit 1;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= ./prog $LOCALE_FR_UTF8 2 > prog.out
+ case $? in
+ 0) ${DIFF} prog.oku prog.out || exit 1;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/lang-c++ b/gettext-tools/tests/lang-c++
index 496ad2f..59bb399 100755
--- a/gettext-tools/tests/lang-c++
+++ b/gettext-tools/tests/lang-c++
@@ -126,22 +126,40 @@ 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
: ${LOCALE_FR=fr_FR}
-LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
+ case $? in
+ 0) ${DIFF} prog.ok prog.out || exit 1;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= ./prog $LOCALE_FR_UTF8 2 > prog.out
+ case $? in
+ 0) ${DIFF} prog.oku prog.out || exit 1;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/lang-clisp b/gettext-tools/tests/lang-clisp
index d8b0460..dcd8b88 100755
--- a/gettext-tools/tests/lang-clisp
+++ b/gettext-tools/tests/lang-clisp
@@ -96,26 +96,52 @@ clisp -norc -x "(sys::exit #+GETTEXT (not (>= $version 2.28)) #-GETTEXT t)" \
>/dev/null \
|| { rm -fr $tmpfiles; exit 77; }
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+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
: ${LOCALE_FR=fr_FR}
-CLISP_LANGUAGE= LANGUAGE= LC_ALL=$LOCALE_FR clisp prog.lisp 2 > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ CLISP_LANGUAGE= LANGUAGE= LC_ALL=$LOCALE_FR clisp prog.lisp 2 > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ CLISP_LANGUAGE= LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 clisp prog.lisp 2 > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/lang-csharp b/gettext-tools/tests/lang-csharp
index 424c7fc..27a4c86 100755
--- a/gettext-tools/tests/lang-csharp
+++ b/gettext-tools/tests/lang-csharp
@@ -98,27 +98,53 @@ tmpfiles="$tmpfiles fr/prog.dll"
GETTEXTCSHARPLIBDIR=../../gettext-runtime/intl-csharp \
${MSGFMT} --csharp -d . -r prog -l fr fr.po || exit 1
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+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
: ${LOCALE_FR=fr_FR}
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
: ${CSHARPEXEC="/bin/sh ../lib/csharpexec.sh"}
-LANGUAGE= LC_ALL=$LOCALE_FR ${CSHARPEXEC} -L ../../gettext-runtime/intl-csharp program.exe 2 > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR ${CSHARPEXEC} -L ../../gettext-runtime/intl-csharp program.exe 2 > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 ${CSHARPEXEC} -L ../../gettext-runtime/intl-csharp program.exe 2 > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/lang-gawk b/gettext-tools/tests/lang-gawk
index b81441d..5a104fc 100755
--- a/gettext-tools/tests/lang-gawk
+++ b/gettext-tools/tests/lang-gawk
@@ -89,31 +89,64 @@ case `gawk --version 2>&1 | sed -e 's/^[^0-9]*//'` in
rm -fr $tmpfiles; exit 77;;
esac
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
# Test that gawk wasn't built with --disable-nls.
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR gawk --version | grep logiciel > /dev/null
-test $? = 0 || { rm -fr $tmpfiles; exit 77; }
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR gawk --version | grep logiciel > /dev/null
+ test $? = 0 || { rm -fr $tmpfiles; exit 77; }
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gawk --version | grep logiciel > /dev/null
+ test $? = 0 || { rm -fr $tmpfiles; exit 77; }
+fi
+
+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
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR gawk -v n=2 -f prog.awk > 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= LC_ALL=$LOCALE_FR gawk -v n=2 -f prog.awk > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gawk -v n=2 -f prog.awk > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/lang-guile b/gettext-tools/tests/lang-guile
index a73beab..79c9495 100755
--- a/gettext-tools/tests/lang-guile
+++ b/gettext-tools/tests/lang-guile
@@ -92,26 +92,52 @@ case `guile --version | sed -e 1q | sed -e 's/^[^0-9]*//'` in
rm -fr $tmpfiles; exit 77;;
esac
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+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
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR guile -s prog.scm 2 > 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= LC_ALL=$LOCALE_FR guile -s prog.scm 2 > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 guile -s prog.scm 2 > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/lang-java b/gettext-tools/tests/lang-java
index 6ef57b2..a9eb2ba 100755
--- a/gettext-tools/tests/lang-java
+++ b/gettext-tools/tests/lang-java
@@ -110,27 +110,53 @@ tmpfiles="$tmpfiles prog_fr.class"
: ${MSGFMT=msgfmt}
${MSGFMT} -j -d . -r prog -l fr fr.po || exit 1
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+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
: ${LOCALE_FR=fr_FR}
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
: ${JAVAEXEC="/bin/sh ../lib/javaexec.sh"}
-LANGUAGE= LC_ALL=$LOCALE_FR CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 > prog.out || exit 1
-${DIFF} prog.ok prog.out || exit 1
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/lang-librep b/gettext-tools/tests/lang-librep
index fda3e94..5b8840a 100755
--- a/gettext-tools/tests/lang-librep
+++ b/gettext-tools/tests/lang-librep
@@ -75,25 +75,50 @@ case `rep --version | sed -e 's/^[^0-9]*//'` in
rm -fr $tmpfiles; exit 77;;
esac
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR rep --no-rc --batch prog.jl > 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= LC_ALL=$LOCALE_FR rep --no-rc --batch prog.jl > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 rep --no-rc --batch prog.jl > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/lang-objc b/gettext-tools/tests/lang-objc
index cc3280f..53f7ae6 100755
--- a/gettext-tools/tests/lang-objc
+++ b/gettext-tools/tests/lang-objc
@@ -127,22 +127,40 @@ 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
: ${LOCALE_FR=fr_FR}
-LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= ./prog $LOCALE_FR 2 > prog.out
+ case $? in
+ 0) ${DIFF} prog.ok prog.out || exit 1;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= ./prog $LOCALE_FR_UTF8 2 > prog.out
+ case $? in
+ 0) ${DIFF} prog.oku prog.out || exit 1;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/lang-pascal b/gettext-tools/tests/lang-pascal
index 1f13e48..46cb24a 100755
--- a/gettext-tools/tests/lang-pascal
+++ b/gettext-tools/tests/lang-pascal
@@ -3,6 +3,11 @@
# Test of gettext facilities in the Object Pascal language.
# Assumes the following packages are installed: fpk.
+# Note: This test fails with fpk 1.0.10 when an UTF-8 locale is present,
+# because fpk ignores the locale's encoding. It supports only unibyte locales.
+# This here is a quick workaround:
+LOCALE_FR_UTF8=none
+
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
@@ -76,17 +81,32 @@ 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.
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR ./prog > prog.out || exit 1
-: ${DIFF=diff}
-${DIFF} prog.ok prog.out || exit 1
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR ./prog > prog.out || exit 1
+ : ${DIFF=diff}
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL= LC_MESSAGES= LC_CTYPE= LANG=$LOCALE_FR_UTF8 ./prog > prog.out || exit 1
+ : ${DIFF=diff}
+ ${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
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
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
diff --git a/gettext-tools/tests/lang-php b/gettext-tools/tests/lang-php
index f5468b8..77de6ce 100755
--- a/gettext-tools/tests/lang-php
+++ b/gettext-tools/tests/lang-php
@@ -71,25 +71,50 @@ case `(php -v) 2>/dev/null` in
*) rm -fr $tmpfiles; exit 77;;
esac
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
«Votre commande, s'il vous plait», dit le garçon.
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR php -q prog.php > 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= LC_ALL=$LOCALE_FR php -q prog.php > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 php -q prog.php > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/lang-python-1 b/gettext-tools/tests/lang-python-1
index 7801b2c..40b686e 100755
--- a/gettext-tools/tests/lang-python-1
+++ b/gettext-tools/tests/lang-python-1
@@ -2,6 +2,10 @@
# Test of gettext facilities in the Python language.
+# Note: This test fails with Python 2.3, 2.4 when an UTF-8 locale is present.
+# It looks like a bug in Python's gettext.py. This here is a quick workaround:
+LOCALE_FR_UTF8=none
+
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
@@ -72,16 +76,30 @@ case `python -c 'import sys; print sys.hexversion >= 0x20000F0'` in
*) rm -fr $tmpfiles; exit 77;;
esac
-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.
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR python prog.py > 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= LC_ALL=$LOCALE_FR python prog.py > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog.py > 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
diff --git a/gettext-tools/tests/lang-python-2 b/gettext-tools/tests/lang-python-2
index 5719f4b..70f889a 100755
--- a/gettext-tools/tests/lang-python-2
+++ b/gettext-tools/tests/lang-python-2
@@ -3,6 +3,10 @@
# Test of gettext facilities (including plural handling) in the Python
# language.
+# Note: This test fails with Python 2.3, 2.4 when an UTF-8 locale is present.
+# It looks like a bug in Python's gettext.py. This here is a quick workaround:
+LOCALE_FR_UTF8=none
+
tmpfiles=""
trap 'rm -fr $tmpfiles' 1 2 3 15
@@ -91,17 +95,32 @@ case `python -c 'import sys; print sys.hexversion >= 0x20300F0'` in
*) rm -fr $tmpfiles; exit 77;;
esac
-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
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR python prog.py 2 > 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= LC_ALL=$LOCALE_FR python prog.py 2 > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 python prog.py 2 > 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
diff --git a/gettext-tools/tests/lang-sh b/gettext-tools/tests/lang-sh
index 000cfec..baca02a 100755
--- a/gettext-tools/tests/lang-sh
+++ b/gettext-tools/tests/lang-sh
@@ -79,25 +79,50 @@ test -d fr/LC_MESSAGES || mkdir fr/LC_MESSAGES
: ${MSGFMT=msgfmt}
${MSGFMT} -o fr/LC_MESSAGES/prog.mo fr.po
-# Test whether the fr_FR locale is installed.
+# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
-LC_ALL=$LOCALE_FR ./testlocale
-case $? in
- 0) ;;
- 77) rm -fr $tmpfiles; exit 77;;
- *) exit 1;;
-esac
-
-tmpfiles="$tmpfiles prog.ok prog.out"
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./testlocale
+ case $? in
+ 0) ;;
+ 77) LOCALE_FR_UTF8=none;;
+ *) exit 1;;
+ esac
+fi
+if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+ rm -fr $tmpfiles; exit 77
+fi
+
+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
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR sh ./prog.sh 2 > 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= LC_ALL=$LOCALE_FR sh ./prog.sh 2 > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 sh ./prog.sh 2 > prog.out || exit 1
+ ${DIFF} prog.oku prog.out || exit 1
+fi
rm -fr $tmpfiles
diff --git a/gettext-tools/tests/lang-smalltalk b/gettext-tools/tests/lang-smalltalk
index 53d310c..31ff305 100755
--- a/gettext-tools/tests/lang-smalltalk
+++ b/gettext-tools/tests/lang-smalltalk
@@ -101,7 +101,7 @@ case `gst --version | sed -n -e 1p | sed -e 's/^[^0-9]*//'` in
rm -fr $tmpfiles; exit 77;;
esac
-tmpfiles="$tmpfiles prog.ok prog.out"
+tmpfiles="$tmpfiles prog.ok prog.oku prog.out"
: ${DIFF=diff}
cat <<\EOF > prog.ok
Loading package I18N
@@ -109,10 +109,26 @@ Loading package I18N
2 morceaux de gateau
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+Loading package I18N
+«Votre commande, s'il vous plait», dit le garçon.
+2 morceaux de gateau
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LC_ALL=$LOCALE_FR gst -Q prog.st > 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= LC_ALL=$LOCALE_FR gst -Q prog.st > prog.out || exit 1
+ ${DIFF} prog.ok prog.out || exit 1
+fi
+if test $LOCALE_FR_UTF8 != none; then
+ LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 gst -Q prog.st > 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
diff --git a/gettext-tools/tests/lang-tcl b/gettext-tools/tests/lang-tcl
index a26a041..c4d4b5e 100755
--- a/gettext-tools/tests/lang-tcl
+++ b/gettext-tools/tests/lang-tcl
@@ -74,16 +74,30 @@ EOF
(tclsh version.tcl) >/dev/null 2>/dev/null \
|| { rm -fr $tmpfiles; exit 77; }
-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.
EUR remplace FF.
EOF
+cat <<\EOF > prog.oku
+«Votre commande, s'il vous plait», dit le garçon.
+EUR remplace FF.
+EOF
: ${LOCALE_FR=fr_FR}
-LANGUAGE= LANG=$LOCALE_FR LC_MESSAGES= LC_CTYPE= LC_ALL= tclsh program.tcl > 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= tclsh program.tcl > 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= tclsh program.tcl > 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