diff options
author | Bruno Haible <bruno@clisp.org> | 2001-11-05 10:50:54 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-21 22:52:00 +0200 |
commit | ebe13f5990a1b373f301648e28f3c2999c8d0ae4 (patch) | |
tree | af51bf66adef17eff11680e626c2a623a3682231 /tests/xgettext-17 | |
parent | 17bd65d934b8c83028ecf3607d3f7d854784ac86 (diff) | |
download | external_gettext-ebe13f5990a1b373f301648e28f3c2999c8d0ae4.zip external_gettext-ebe13f5990a1b373f301648e28f3c2999c8d0ae4.tar.gz external_gettext-ebe13f5990a1b373f301648e28f3c2999c8d0ae4.tar.bz2 |
Add an YCP plural test.
Diffstat (limited to 'tests/xgettext-17')
-rwxr-xr-x | tests/xgettext-17 | 33 |
1 files changed, 33 insertions, 0 deletions
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 |