diff options
author | Bruno Haible <bruno@clisp.org> | 2005-02-15 14:48:11 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:12:16 +0200 |
commit | 5757f7f4d8493dfa34ece58e6bb3ae41f4e48224 (patch) | |
tree | afcf361da8b10d937cc1810260f4f3d9cd6ee799 /gettext-tools/tests/lang-objc | |
parent | 8225187c2ae081bff8b081fe4cccb21b2fc1fc5d (diff) | |
download | external_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-objc')
-rwxr-xr-x | gettext-tools/tests/lang-objc | 34 |
1 files changed, 26 insertions, 8 deletions
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 |