summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2014-05-12 18:20:59 +0900
committerDaiki Ueno <ueno@gnu.org>2014-05-12 18:20:59 +0900
commit76521fca60c533ef513413fb081090b61e712638 (patch)
tree37586d6765e04c19379eb7a91bdab7df259bfe96
parentcb9da089c9c5c2516d50925890cfafdf23c80b36 (diff)
downloadexternal_gettext-76521fca60c533ef513413fb081090b61e712638.zip
external_gettext-76521fca60c533ef513413fb081090b61e712638.tar.gz
external_gettext-76521fca60c533ef513413fb081090b61e712638.tar.bz2
tests: Improve test coverage
-rwxr-xr-xgettext-tools/tests/msgfmt-desktop-24
-rwxr-xr-xgettext-tools/tests/xgettext-vala-17
2 files changed, 10 insertions, 1 deletions
diff --git a/gettext-tools/tests/msgfmt-desktop-2 b/gettext-tools/tests/msgfmt-desktop-2
index 86a4ab4..69f1f89 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 3c8b1e0..ce63611 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 ""