2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test of --java option.
6 # Note: This test fails when using gcj from GCC 3.1 and GCC 3.2, due to a bug
7 # (libgcj/6576). It is fixed in GCC 3.3.
9 # Test whether we can compile and execute Java programs.
10 test "${JAVA_CHOICE}" != no || {
11 echo "Skipping test: configured with --disable-java"
14 test "${BUILDJAVA}" = yes || {
15 echo "Skipping test: Java compiler or jar not found"
18 test "${TESTJAVA}" = yes || {
19 echo "Skipping test: Java engine not found"
23 test -d mu-java-1 || mkdir mu-java-1
25 cat <<\EOF > mu-java-1/fr.po
28 "Content-Type: text/plain; charset=ISO-8859-1\n"
29 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
31 msgid "'Your command, please?', asked the waiter."
32 msgstr "«Votre commande, s'il vous plait», dit le garçon."
34 # Les gateaux allemands sont les meilleurs du monde.
36 msgid "a piece of cake"
37 msgid_plural "{0,number} pieces of cake"
38 msgstr[0] "un morceau de gateau"
39 msgstr[1] "{0,number} morceaux de gateau"
41 # Reverse the arguments.
43 msgid "{0} is replaced by {1}."
44 msgstr "{1} remplace {0}."
46 # A proximity measure.
57 ${MSGFMT} -j -d mu-java-1 -r prog -l fr mu-java-1/fr.po || exit 1
59 : ${MSGUNFMT=msgunfmt}
60 CLASSPATH=mu-java-1${CLASSPATH:+:$CLASSPATH} \
61 GETTEXTJEXEDIR=../../src GETTEXTJAR=../../src/gettext.jar \
62 ${MSGUNFMT} --java -d mu-java-1 -r prog -l fr -o mu-java-1/prog.out || exit 1
65 ${MSGCAT} -s -o mu-java-1/prog.sort mu-java-1/prog.out || exit 1
67 cat <<\EOF > mu-java-1/prog.ok
70 "Content-Type: text/plain; charset=UTF-8\n"
71 "Plural-Forms: nplurals=2; plural=(n > 1);\n"
73 msgid "'Your command, please?', asked the waiter."
74 msgstr "«Votre commande, s'il vous plait», dit le garçon."
83 msgid "a piece of cake"
84 msgid_plural "{0,number} pieces of cake"
85 msgstr[0] "un morceau de gateau"
86 msgstr[1] "{0,number} morceaux de gateau"
88 msgid "{0} is replaced by {1}."
89 msgstr "{1} remplace {0}."
92 ${DIFF} mu-java-1/prog.ok mu-java-1/prog.sort || exit 1