summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2001-11-05 10:50:54 +0000
committerBruno Haible <bruno@clisp.org>2009-06-21 22:52:00 +0200
commitebe13f5990a1b373f301648e28f3c2999c8d0ae4 (patch)
treeaf51bf66adef17eff11680e626c2a623a3682231 /tests
parent17bd65d934b8c83028ecf3607d3f7d854784ac86 (diff)
downloadexternal_gettext-ebe13f5990a1b373f301648e28f3c2999c8d0ae4.zip
external_gettext-ebe13f5990a1b373f301648e28f3c2999c8d0ae4.tar.gz
external_gettext-ebe13f5990a1b373f301648e28f3c2999c8d0ae4.tar.bz2
Add an YCP plural test.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog8
-rw-r--r--tests/Makefile.am2
-rwxr-xr-xtests/xgettext-1733
3 files changed, 42 insertions, 1 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 167a36c..a9f3e15 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,11 @@
+2001-11-03 Bruno Haible <haible@clisp.cons.org>
+
+ * Makefile.am (TESTS): Add xgettext-17.
+
+2001-11-01 Karl Eichwalder <keichwa@gmx.net>
+
+ * xgettext-17: New file.
+
2001-11-01 Bruno Haible <haible@clisp.cons.org>
* msgcat-6: Update expected output to match new msgcat behaviour.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ab2637c..fc263eb 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -33,7 +33,7 @@ TESTS = gettext-1 gettext-2 \
msguniq-1 msguniq-2 msguniq-3 \
xgettext-1 xgettext-2 xgettext-3 xgettext-4 xgettext-5 xgettext-6 \
xgettext-7 xgettext-8 xgettext-9 xgettext-10 xgettext-11 xgettext-12 \
- xgettext-13 xgettext-14 xgettext-15 xgettext-16 \
+ xgettext-13 xgettext-14 xgettext-15 xgettext-16 xgettext-17 \
format-c-1 format-c-2 \
format-java-1 format-java-2 \
format-lisp-1 format-lisp-2 \
diff --git a/tests/xgettext-17 b/tests/xgettext-17
new file mode 100755
index 0000000..a5a9c83
--- /dev/null
+++ b/tests/xgettext-17
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# Plural test for YCP
+#
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles xg-test17.ycp"
+cat <<EOF > xg-test17.ycp
+title = sformat (_("%1 package", "%1 packages", num), num);
+EOF
+
+tmpfiles="$tmpfiles xg-test17.po"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --omit-header --no-location -k:1,2 -d xg-test17 xg-test17.ycp
+
+tmpfiles="$tmpfiles xg-test17.ok"
+cat <<EOF > xg-test17.ok
+#, ycp-format
+msgid "%1 package"
+msgid_plural "%1 packages"
+msgstr[0] ""
+msgstr[1] ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-test17.ok xg-test17.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result