From: Bruno Haible Date: Wed, 8 Sep 2004 13:23:00 +0000 (+0000) Subject: Don't require Java 1.4. X-Git-Tag: v0.14.2~229 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=041c02babe324bc5f332251a6fe70fd544e1eba5;p=thirdparty%2Fgettext.git Don't require Java 1.4. --- diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index f829cc74c..c6b126468 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,9 @@ +2004-09-08 Bruno Haible + + Make lang-java work again on platforms with Java version < 1.4. + * lang-java: Undo last patch for all platforms except Darwin. + * Makefile.am (TESTS_ENVIRONMENT): Also define host_os. + 2004-08-13 Bruno Haible Fix test failures on MacOS X. diff --git a/gettext-tools/tests/Makefile.am b/gettext-tools/tests/Makefile.am index c02b8682c..c303d34db 100644 --- a/gettext-tools/tests/Makefile.am +++ b/gettext-tools/tests/Makefile.am @@ -1,5 +1,5 @@ ## Makefile for the gettext-tools/tests subdirectory of GNU gettext -## Copyright (C) 1995-1997, 2001-2003 Free Software Foundation, Inc. +## Copyright (C) 1995-1997, 2001-2004 Free Software Foundation, Inc. ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -143,6 +143,7 @@ TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) \ TESTCSHARP='@TESTCSHARP@' \ TESTLIBASPRINTF='@TESTLIBASPRINTF@' \ LOCALE_FR='@LOCALE_FR@' \ + host_os='@host_os@' \ CONFIG_SHELL='$(SHELL)' \ $(SHELL) diff --git a/gettext-tools/tests/lang-java b/gettext-tools/tests/lang-java index a8cac3ff9..6ef57b24d 100755 --- a/gettext-tools/tests/lang-java +++ b/gettext-tools/tests/lang-java @@ -25,6 +25,10 @@ public class Program { // Some systems (like Solaris) don't set Locale.getDefault() // as specified by LC_ALL. So set it by hand. Locale.setDefault(new Locale("fr","FR")); +EOF +case "$host_os" in + darwin*) +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 { @@ -32,6 +36,10 @@ public class Program { true, "ISO-8859-1")); } catch (UnsupportedEncodingException e) { } +EOF + ;; +esac +cat <<\EOF >> Program.java int n = Integer.parseInt(args[0]); ResourceBundle catalog = ResourceBundle.getBundle("prog"); System.out.println(GettextResource.gettext(catalog,"'Your command, please?', asked the waiter."));