#define X ""
gettext (X"This is a concatenation of a macro and a string");
+#define RR ""
+gettext (RR"This (is NOT a raw string");
+
+#define u8RR ""
+gettext (u8RR"This (is NOT a raw string");
+
+#define uRR ""
+gettext (uRR"This (is NOT a raw string");
+
+#define URR ""
+gettext (URR"This (is NOT a raw string");
+
+#define LRR ""
+gettext (LRR"This (is NOT a raw string");
+
+#define uX ""
+gettext (uX"This (is NOT a raw string");
+
gettext (u8"This is a UTF-8 string");
u88"This is not a UTF-8 string";
msgid "This is a concatenation of a macro and a string"
msgstr ""
+msgid "This (is NOT a raw string"
+msgstr ""
+
msgid "This is a UTF-8 string"
msgstr ""
EOF
: ${DIFF=diff}
-${DIFF} xg-c-20.ok xg-c-20.po
-result=$?
+${DIFF} xg-c-20.ok xg-c-20.po || exit 1
+
+cat <<\EOF > xg-c-20.c
+gettext (R"aaa(This is NOT a raw string");
+
+gettext (u8R"aaa(This is NOT a raw string");
+
+uR"aaa(This is NOT a raw string";
+EOF
+
+${XGETTEXT} --add-comments --no-location --no-wrap \
+ -o - xg-c-20.c | grep -v 'POT-Creation-Date' > xg-c-20c.tmp.po \
+ || { cp core* ..; exit 1; }
+LC_ALL=C tr -d '\r' < xg-c-20c.tmp.po > xg-c-20c.po || exit 1
+
+cat <<\EOF > xg-c-20c.ok
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+msgid "aaa(This is NOT a raw string"
+msgstr ""
+EOF
-exit $result
+${DIFF} xg-c-20c.ok xg-c-20c.po || exit 1