From: Daiki Ueno Date: Mon, 12 May 2014 09:20:59 +0000 (+0900) Subject: tests: Improve test coverage X-Git-Tag: v0.19~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=76521fca60c533ef513413fb081090b61e712638;p=thirdparty%2Fgettext.git tests: Improve test coverage --- diff --git a/gettext-tools/tests/msgfmt-desktop-2 b/gettext-tools/tests/msgfmt-desktop-2 index 86a4ab4a7..69f1f89c6 100755 --- a/gettext-tools/tests/msgfmt-desktop-2 +++ b/gettext-tools/tests/msgfmt-desktop-2 @@ -7,8 +7,10 @@ cat <<\EOF > mf.desktop [Desktop Entry] Type=Application Name =Foo + Comment[foo]=Already translated comment Comment= \sThis is a \nmultiline comment; for testing +# This is a comment and must be preserved Keywords=Keyword1;Keyword2;Key\;word3; EOF @@ -98,10 +100,12 @@ Type=Application Name[de]=German\nfoo Name[fr]=French\nfoo Name=Foo + Comment[foo]=Already translated comment Comment[de]=German \ncomment Comment[fr]=French \ncomment Comment=\sThis is a \nmultiline comment; for testing +# This is a comment and must be preserved Keywords[de]=one;two;thr\;ee; Keywords[fr]=one;two;thr\;ee; Keywords=Keyword1;Keyword2;Key\;word3; diff --git a/gettext-tools/tests/xgettext-vala-1 b/gettext-tools/tests/xgettext-vala-1 index 3c8b1e0df..ce6361118 100755 --- a/gettext-tools/tests/xgettext-vala-1 +++ b/gettext-tools/tests/xgettext-vala-1 @@ -5,7 +5,9 @@ cat <<\EOF > xg-vala-1.vala int main (string[] args) { - var s1 = "Simple string, no gettext needed"; + var s1 = "Simple string, " + " no gettext needed"; + var c1 = '\''; + // This is a C++ style comment var s2 = _("Extract this first string"); var s3 = "Prefix _(" + _("Extract this second string") + ") Postfix"; @@ -18,6 +20,8 @@ int main (string[] args) { fourth string"""); var s5 = _("Extract this \u2464th string"); + + var s6 = /_("This is a regex literal and must not be extracted!")/i; return 0; } EOF @@ -48,6 +52,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +#. This is a C++ style comment msgid "Extract this first string" msgstr ""