From c68e3451be08fccc74c19b907647eaaa7a611d24 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 13 Feb 2006 13:10:14 +0000 Subject: Test against bug that confused qt-format and c-format. --- gettext-tools/tests/xgettext-c-13 | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 gettext-tools/tests/xgettext-c-13 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 < 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 -- cgit v1.1