summaryrefslogtreecommitdiffstats
path: root/gettext-tools/tests/xgettext-c-13
diff options
context:
space:
mode:
Diffstat (limited to 'gettext-tools/tests/xgettext-c-13')
-rwxr-xr-xgettext-tools/tests/xgettext-c-1333
1 files changed, 33 insertions, 0 deletions
diff --git a/gettext-tools/tests/xgettext-c-13 b/gettext-tools/tests/xgettext-c-13
new file mode 100755
index 0000000..ddf9d31
--- /dev/null
+++ b/gettext-tools/tests/xgettext-c-13
@@ -0,0 +1,33 @@
+#! /bin/sh
+
+# Test C++ support: test --flag that introduces qt-format.
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles xg-c-13.cc"
+cat <<\EOF > xg-c-13.cc
+foo (gettext ("on"));
+EOF
+
+tmpfiles="$tmpfiles xg-c-13.po"
+: ${XGETTEXT=xgettext}
+${XGETTEXT} --omit-header --no-location -d xg-c-13 \
+ --flag=foo:1:qt-format --flag=gettext:1:pass-qt-format --qt \
+ xg-c-13.cc
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles xg-c-13.ok"
+cat <<EOF > xg-c-13.ok
+#, qt-format
+msgid "on"
+msgstr ""
+EOF
+
+: ${DIFF=diff}
+${DIFF} xg-c-13.ok xg-c-13.po
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result