summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/xgettext-java-4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2003-11-03 21:08:55 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:11:10 +0200
commit4b809533f4275fa9709b056b5b5917ba261d1099 (patch)
treeeda0f06f08cd8cf9a76197c5074d9bf6325eecf1 /gettext-tools/tests/xgettext-java-4
parentad40d415cdb69bccf6d75bbce2182d9c9aeb6f61 (diff)
downloadexternal_gettext-4b809533f4275fa9709b056b5b5917ba261d1099.zip
external_gettext-4b809533f4275fa9709b056b5b5917ba261d1099.tar.gz
external_gettext-4b809533f4275fa9709b056b5b5917ba261d1099.tar.bz2
Move xgettext-16 to xgettext-java-4.
Diffstat (limited to 'gettext-tools/tests/xgettext-java-4')
-rwxr-xr-xgettext-tools/tests/xgettext-java-438
1 files changed, 38 insertions, 0 deletions
diff --git a/gettext-tools/tests/xgettext-java-4 b/gettext-tools/tests/xgettext-java-4
new file mode 100755
index 0000000..87fd468
--- /dev/null
+++ b/gettext-tools/tests/xgettext-java-4
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# Some tests for java plural keyword support
+#
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles xg-test16.java"
+cat <<EOF > xg-test16.java
+class TestCase {
+ public TestCase() {
+ Bundle test = Bundle.getBundle();
+ test.ngettext(test, "test 1", "plural test");
+ }
+}
+EOF
+
+tmpfiles="$tmpfiles xg-test16.po"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --omit-header --no-location --keyword=ngettext:2,3 -d xg-test16 xg-test16.java
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles xg-test16.ok"
+cat <<EOF > xg-test16.ok
+msgid "test 1"
+msgid_plural "plural test"
+msgstr[0] ""
+msgstr[1] ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-test16.ok xg-test16.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result