]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
tests: Improve test coverage
authorDaiki Ueno <ueno@gnu.org>
Mon, 12 May 2014 09:20:59 +0000 (18:20 +0900)
committerDaiki Ueno <ueno@gnu.org>
Mon, 12 May 2014 09:20:59 +0000 (18:20 +0900)
gettext-tools/tests/msgfmt-desktop-2
gettext-tools/tests/xgettext-vala-1

index 86a4ab4a788978d8fc98476e15de9c3c75174d77..69f1f89c6e4eeff650dadd2e05102b0e8e0a4c96 100755 (executable)
@@ -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;
index 3c8b1e0df54d17457f7d8d5f253bc52a02dd1964..ce6361118cdc80e92d3f4577cee5947313886e89 100755 (executable)
@@ -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 ""