summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/lang-java
diff options
context:
space:
mode:
Diffstat (limited to 'gettext-tools/tests/lang-java')
-rw-r--r--[-rwxr-xr-x]gettext-tools/tests/lang-java27
1 files changed, 5 insertions, 22 deletions
diff --git a/gettext-tools/tests/lang-java b/gettext-tools/tests/lang-java
index 6e7d194..4cd2020 100755..100644
--- a/gettext-tools/tests/lang-java
+++ b/gettext-tools/tests/lang-java
@@ -8,9 +8,6 @@
# Note: This test fails when using gcj from GCC 3.1 and GCC 3.2, due to a bug
# (libgcj/6576). It is fixed in GCC 3.3.
-tmpfiles=""
-trap 'rm -fr $tmpfiles' 1 2 3 15
-
# Test whether we can build and test Java programs.
test "${JAVA_CHOICE}" != no || {
echo "Skipping test: configured with --disable-java"
@@ -25,7 +22,6 @@ test "${TESTJAVA}" = yes || {
exit 77
}
-tmpfiles="$tmpfiles Program.java"
cat <<\EOF > Program.java
import java.util.*;
import java.io.*;
@@ -63,21 +59,16 @@ cat <<\EOF >> Program.java
}
EOF
-tmpfiles="$tmpfiles Program.class l-java l-java-prog.err"
test -d l-java || mkdir l-java
: ${JAVACOMP="/bin/sh ../../javacomp.sh"}
CLASSPATH=../../../gettext-runtime/intl-java/libintl.jar ${JAVACOMP} -d l-java Program.java 2>l-java-prog.err \
|| { cat l-java-prog.err 1>&2; exit 1; }
-tmpfiles="$tmpfiles l-java-prog.tmp l-java-prog.pot"
: ${XGETTEXT=xgettext}
-${XGETTEXT} -o l-java-prog.tmp --omit-header --no-location Program.java
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < l-java-prog.tmp > l-java-prog.pot
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${XGETTEXT} -o l-java-prog.tmp --omit-header --no-location Program.java || exit 1
+LC_ALL=C tr -d '\r' < l-java-prog.tmp > l-java-prog.pot || exit 1
-tmpfiles="$tmpfiles l-java-prog.ok"
cat <<EOF > l-java-prog.ok
msgid "'Your command, please?', asked the waiter."
msgstr ""
@@ -108,7 +99,6 @@ EOF
: ${DIFF=diff}
${DIFF} l-java-prog.ok l-java-prog.pot || exit 1
-tmpfiles="$tmpfiles l-java-fr.po"
cat <<\EOF > l-java-fr.po
msgid ""
msgstr ""
@@ -145,17 +135,13 @@ msgid "{0} is replaced by {1}."
msgstr "Le nouveau {1} remplace le vieux {0}."
EOF
-tmpfiles="$tmpfiles l-java-fr.po.tmp l-java-fr.po.new"
: ${MSGMERGE=msgmerge}
-${MSGMERGE} -q -o l-java-fr.po.tmp l-java-fr.po l-java-prog.pot
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
-LC_ALL=C tr -d '\r' < l-java-fr.po.tmp > l-java-fr.po.new
-test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+${MSGMERGE} -q -o l-java-fr.po.tmp l-java-fr.po l-java-prog.pot || exit 1
+LC_ALL=C tr -d '\r' < l-java-fr.po.tmp > l-java-fr.po.new || exit 1
: ${DIFF=diff}
${DIFF} l-java-fr.po l-java-fr.po.new || exit 1
-tmpfiles="$tmpfiles prog_fr.class"
: ${MSGFMT=msgfmt}
${MSGFMT} -j -d l-java -r prog -l fr l-java-fr.po || exit 1
@@ -184,10 +170,9 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
else
echo "Skipping test: no french locale is supported"
fi
- rm -fr $tmpfiles; exit 77
+ exit 77
fi
-tmpfiles="$tmpfiles l-java-prog.ok l-java-prog.oku l-java-prog.out"
: ${DIFF=diff}
cat <<\EOF > l-java-prog.ok
«Votre commande, s'il vous plait», dit le garçon.
@@ -216,6 +201,4 @@ if test $LOCALE_FR_UTF8 != none; then
${DIFF} l-java-prog.oku l-java-prog.out || exit 1
fi
-rm -fr $tmpfiles
-
exit 0