]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid a test failure on MacOS X 10.5.
authorBruno Haible <bruno@clisp.org>
Sun, 13 Dec 2009 09:53:13 +0000 (10:53 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 13 Dec 2009 11:11:18 +0000 (12:11 +0100)
gettext-tools/tests/ChangeLog
gettext-tools/tests/lang-java

index 16e613b633249dafdee17ff2bd838d6bc582931c..50edabf6d4c2f0c988ecd2e3d339819cf475f5c3 100644 (file)
@@ -1,3 +1,9 @@
+2009-12-13  Bruno Haible  <bruno@clisp.org>
+
+       Avoid a test failure on MacOS X 10.5.
+       * lang-java: Make the test work when both locales fr_FR.ISO8859-1 and
+       fr_FR.UTF-8 exist.
+
 2009-12-12  Bruno Haible  <bruno@clisp.org>
 
        * *.c: Untabify.
index f6cecb64e0658b0c49789c03730955bdb90b3f13..da9cd0ee4c1dbc7b214cf5a0fe412349bd27eb67 100755 (executable)
@@ -38,24 +38,13 @@ public class Program {
     Locale.setDefault(new Locale("fr","FR"));
 EOF
 case "$host_os" in
-  darwin[56]*)
-cat <<\EOF >> Program.java
-    // Some systems (like MacOS X) don't set System.out's character encoding
-    // to ISO-8859-1, which is what we need for comparison purposes.
-    try {
-      System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out),
-                                    true, "ISO-8859-1"));
-    } catch (UnsupportedEncodingException e) {
-    }
-EOF
-    ;;
   darwin*)
 cat <<\EOF >> Program.java
     // Some systems (like MacOS X) don't set System.out's character encoding
-    // to UTF-8, which is what we need for comparison purposes.
+    // according to LC_ALL, which is what we need for comparison purposes.
     try {
       System.setOut(new PrintStream(new FileOutputStream(FileDescriptor.out),
-                                    true, "UTF-8"));
+                                    true, args[1]));
     } catch (UnsupportedEncodingException e) {
     }
 EOF
@@ -216,11 +205,11 @@ EOF
 : ${LOCALE_FR_UTF8=fr_FR.UTF-8}
 : ${JAVAEXEC="/bin/sh ../javaexec.sh"}
 if test $LOCALE_FR != none; then
-  LANGUAGE= LC_ALL=$LOCALE_FR CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 > prog.out || exit 1
+  LANGUAGE= LC_ALL=$LOCALE_FR CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 ISO-8859-1 > 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 CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 > prog.out || exit 1
+  LANGUAGE= LC_ALL=$LOCALE_FR_UTF8 CLASSPATH=.:../../gettext-runtime/intl-java/libintl.jar ${JAVAEXEC} Program 2 UTF-8 > prog.out || exit 1
   ${DIFF} prog.oku prog.out || exit 1
 fi