1#! /bin/sh 2 3# Test C++ support: test --flag that introduces qt-format. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8tmpfiles="$tmpfiles xg-c-13.cc" 9cat <<\EOF > xg-c-13.cc 10foo (gettext ("on")); 11EOF 12 13tmpfiles="$tmpfiles xg-c-13.tmp.po xg-c-13.po" 14: ${XGETTEXT=xgettext} 15${XGETTEXT} --omit-header --no-location -d xg-c-13.tmp \ 16 --flag=foo:1:qt-format --flag=gettext:1:pass-qt-format --qt \ 17 xg-c-13.cc 18test $? = 0 || { rm -fr $tmpfiles; exit 1; } 19tr -d '\r' < xg-c-13.tmp.po > xg-c-13.po 20test $? = 0 || { rm -fr $tmpfiles; exit 1; } 21 22tmpfiles="$tmpfiles xg-c-13.ok" 23cat <<EOF > xg-c-13.ok 24#, qt-format 25msgid "on" 26msgstr "" 27EOF 28 29: ${DIFF=diff} 30${DIFF} xg-c-13.ok xg-c-13.po 31result=$? 32 33rm -fr $tmpfiles 34 35exit $result 36