]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
tests: Fix a lang-java failure on native Windows with MSVC.
authorBruno Haible <bruno@clisp.org>
Wed, 30 Jul 2025 14:22:32 +0000 (16:22 +0200)
committerBruno Haible <bruno@clisp.org>
Wed, 30 Jul 2025 14:22:32 +0000 (16:22 +0200)
* gettext-tools/tests/lang-java: On native Windows, don't test the UTF-8 locale.

gettext-tools/tests/lang-java

index 48fd802504c145a59ae7d389529dfe33eeff6d5c..ab49f480c7a0325304895ab74edb77debbb2a95d 100755 (executable)
@@ -212,6 +212,12 @@ EOF
 
 : ${LOCALE_FR=fr_FR}
 : ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+# Java on Windows (a native Windows program) does not support the native Windows
+# locale name French_France.65001. It produces ISO-8859-1 encoded output
+# nevertheless.
+case "$host_os" in
+  mingw* | windows*) LOCALE_FR_UTF8=none ;;
+esac
 : ${JAVAEXEC="/bin/sh ../../javaexec.sh"}
 if test $LOCALE_FR != none; then
   LANGUAGE= LC_ALL=$LOCALE_FR CLASSPATH=".${CLASSPATH_SEPARATOR}../../../gettext-runtime/intl-java/libintl.jar" ${JAVAEXEC} Program 2 ISO-8859-1 > prog.tmp || Exit 1