summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/lang-csharp
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-csharp
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-csharp')
-rwxr-xr-xgettext-tools/tests/lang-csharp48
1 files changed, 37 insertions, 11 deletions
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