]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Test against bug that confused qt-format and c-format.
authorBruno Haible <bruno@clisp.org>
Mon, 13 Feb 2006 13:10:14 +0000 (13:10 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:59 +0000 (12:12 +0200)
gettext-tools/tests/xgettext-c-13 [new file with mode: 0755]

diff --git a/gettext-tools/tests/xgettext-c-13 b/gettext-tools/tests/xgettext-c-13
new file mode 100755 (executable)
index 0000000..ddf9d31
--- /dev/null
@@ -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