darwin*) echo "Skipping test: gjs gettext module possibly broken"; Exit 77;;
esac
-# Test which of the fr_FR locales are installed.
: ${LOCALE_FR=fr_FR}
: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
-# gjs on macOS supports only UTF-8 locales.
-case "$host_os" in
- darwin*) LOCALE_FR=none ;;
-esac
-if test $LOCALE_FR != none; then
- LC_ALL=$LOCALE_FR ../testlocale
- case $? in
- 0) ;;
- 77) LOCALE_FR=none;;
- *) Exit 1;;
- esac
-fi
+# As of 2026, gjs in the ${LOCALE_FR} locale produces ISO-8859-1 encoded output
+# when stdout is a terminal, but UTF-8 encoded output when stdout is redirected
+# to a file or to a pipe. This prevents us from testing this case. We can only
+# test ${LOCALE_FR_UTF8}.
if test $LOCALE_FR_UTF8 != none; then
LC_ALL=$LOCALE_FR_UTF8 ../testlocale
case $? in
*) Exit 1;;
esac
fi
-if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
+if test $LOCALE_FR_UTF8 = none; then
if test -f /usr/bin/localedef; then
- echo "Skipping test: no french locale is installed"
+ echo "Skipping test: no french Unicode locale is installed"
else
- echo "Skipping test: no french locale is supported"
+ echo "Skipping test: no french Unicode locale is supported"
fi
Exit 77
fi
: ${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}
: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
-if test $LOCALE_FR != none; then
- LANGUAGE= LC_ALL=$LOCALE_FR gjs prog.js > 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 gjs prog.js > prog.out || Exit 1
- ${DIFF} prog.oku prog.out || Exit 1
+ ${DIFF} prog.ok prog.out || Exit 1
fi
Exit 0