From: Bruno Haible Date: Wed, 28 Jan 2009 02:15:51 +0000 (+0000) Subject: Test the qt-plural-format flag. X-Git-Tag: v0.18~243 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=78d8599703f394678538d7c0d974cf8095a34f91;p=thirdparty%2Fgettext.git Test the qt-plural-format flag. --- diff --git a/gettext-tools/tests/ChangeLog b/gettext-tools/tests/ChangeLog index b87fac300..84930a663 100644 --- a/gettext-tools/tests/ChangeLog +++ b/gettext-tools/tests/ChangeLog @@ -1,3 +1,8 @@ +2009-01-27 Bruno Haible + + * xgettext-c-13: Test also the 3 variants of the tr function and the + qt-plural-format flag. + 2009-01-25 Bruno Haible Avoid a test suite failure on platforms that have a gl_IE locale. diff --git a/gettext-tools/tests/xgettext-c-13 b/gettext-tools/tests/xgettext-c-13 index 2db0a743f..94d567f0d 100755 --- a/gettext-tools/tests/xgettext-c-13 +++ b/gettext-tools/tests/xgettext-c-13 @@ -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 < 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}