]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Test the qt-plural-format flag.
authorBruno Haible <bruno@clisp.org>
Wed, 28 Jan 2009 02:15:51 +0000 (02:15 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:16:01 +0000 (12:16 +0200)
gettext-tools/tests/ChangeLog
gettext-tools/tests/xgettext-c-13

index b87fac300820ad9da5dbba71f96d45301a6f4155..84930a663ecb38f2c919d3cf659e58f5a17094b0 100644 (file)
@@ -1,3 +1,8 @@
+2009-01-27  Bruno Haible  <bruno@clisp.org>
+
+       * xgettext-c-13: Test also the 3 variants of the tr function and the
+       qt-plural-format flag.
+
 2009-01-25  Bruno Haible  <bruno@clisp.org>
 
        Avoid a test suite failure on platforms that have a gl_IE locale.
index 2db0a743f35e6f3774830d8154d83edb8dadfb1f..94d567f0db72996c262aecb278f1e9e28b1d1e75 100755 (executable)
@@ -8,12 +8,17 @@ trap 'rm -fr $tmpfiles' 1 2 3 15
 tmpfiles="$tmpfiles xg-c-13.cc"
 cat <<\EOF > xg-c-13.cc
 foo (gettext ("on"));
+tr ("stopped");
+tr ("action", "");
+tr ("deleted %n files", "", numdel);
 EOF
 
 tmpfiles="$tmpfiles xg-c-13.tmp.po xg-c-13.po"
 : ${XGETTEXT=xgettext}
 ${XGETTEXT} --omit-header --no-location -d xg-c-13.tmp \
-  --flag=foo:1:qt-format --flag=gettext:1:pass-qt-format --qt \
+  --qt \
+  --flag=foo:1:qt-format --flag=gettext:1:pass-qt-format \
+  --keyword=tr:1,1t --keyword=tr:1,2c,2t --keyword=tr:1,1,2c,3t \
   xg-c-13.cc
 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
 LC_ALL=C tr -d '\r' < xg-c-13.tmp.po > xg-c-13.po
@@ -24,6 +29,20 @@ cat <<EOF > xg-c-13.ok
 #, qt-format
 msgid "on"
 msgstr ""
+
+msgid "stopped"
+msgstr ""
+
+msgctxt ""
+msgid "action"
+msgstr ""
+
+#, qt-plural-format
+msgctxt ""
+msgid "deleted %n files"
+msgid_plural "deleted %n files"
+msgstr[0] ""
+msgstr[1] ""
 EOF
 
 : ${DIFF=diff}