From: Bruno Haible Date: Mon, 13 Feb 2006 13:10:14 +0000 (+0000) Subject: Test against bug that confused qt-format and c-format. X-Git-Tag: v0.15~317 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c68e3451be08fccc74c19b907647eaaa7a611d24;p=thirdparty%2Fgettext.git Test against bug that confused qt-format and c-format. --- diff --git a/gettext-tools/tests/xgettext-c-13 b/gettext-tools/tests/xgettext-c-13 new file mode 100755 index 000000000..ddf9d310d --- /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