diff options
Diffstat (limited to 'gettext-tools/tests/lang-clisp')
-rwxr-xr-x | gettext-tools/tests/lang-clisp | 48 |
1 files changed, 37 insertions, 11 deletions
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 |