]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
xgettext: Enhance test for NUL byte handling.
authorBruno Haible <bruno@clisp.org>
Sun, 4 Nov 2018 18:42:32 +0000 (19:42 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 4 Nov 2018 23:24:45 +0000 (00:24 +0100)
* gettext-tools/tests/xg-c-21.c: Add some more test cases.
* gettext-tools/tests/xgettext-c-21: Update expected result accordingly. Change
expected result for backslash-NUL.

gettext-tools/tests/xg-c-21.c
gettext-tools/tests/xgettext-c-21

index d49b6f0a2554dea7acb3316b7ee6d8267bb01868..fc95e5da9e2747fbeedc6c96505500b76f9e8eac 100644 (file)
Binary files a/gettext-tools/tests/xg-c-21.c and b/gettext-tools/tests/xg-c-21.c differ
index a293653151aae8cacddc5e048a68c1761b318295..5622f4bdcf02f33937852a9e687acd0ece35ced0 100755 (executable)
@@ -5,7 +5,7 @@
 
 : ${XGETTEXT=xgettext}
 
-${XGETTEXT} --add-comments --no-location --no-wrap \
+${XGETTEXT} --no-location --no-wrap \
             -o xg-c-21.tmp "$abs_srcdir"/xg-c-21.c || Exit 1
 grep -v 'POT-Creation-Date' < xg-c-21.tmp > xg-c-21.tmq || Exit 1
 LC_ALL=C tr -d '\r' < xg-c-21.tmq > xg-c-21.po || Exit 1
@@ -29,16 +29,46 @@ msgstr ""
 "Content-Type: text/plain; charset=CHARSET\n"
 "Content-Transfer-Encoding: 8bit\n"
 
-msgid "\n"
+msgid "1abc"
 msgstr ""
 
-msgid "\\u"
+msgid "2abc"
 msgstr ""
 
-msgid "\\U"
+msgid "3abc"
 msgstr ""
 
-msgid "\\u3"
+msgid "4abc"
+msgstr ""
+
+msgid "5abc"
+msgstr ""
+
+msgid "6abc"
+msgstr ""
+
+msgid "7abc"
+msgstr ""
+
+msgid "8abc\\x"
+msgstr ""
+
+msgid "9abc\n"
+msgstr ""
+
+msgid "10abc\\u"
+msgstr ""
+
+msgid "11abc\\U"
+msgstr ""
+
+msgid "12abc\\u3"
+msgstr ""
+
+msgid "13abc\\u45"
+msgstr ""
+
+msgid "14abc\\u567"
 msgstr ""
 EOF