diff options
author | Bruno Haible <bruno@clisp.org> | 2006-02-13 13:10:14 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2009-06-23 12:12:59 +0200 |
commit | c68e3451be08fccc74c19b907647eaaa7a611d24 (patch) | |
tree | 61cb309382c64517aff7be66126841b4b42a5c50 | |
parent | 1d4646967449a79cb73b20607fd47015fd845a47 (diff) | |
download | external_gettext-c68e3451be08fccc74c19b907647eaaa7a611d24.zip external_gettext-c68e3451be08fccc74c19b907647eaaa7a611d24.tar.gz external_gettext-c68e3451be08fccc74c19b907647eaaa7a611d24.tar.bz2 |
Test against bug that confused qt-format and c-format.
-rwxr-xr-x | gettext-tools/tests/xgettext-c-13 | 33 |
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 |