2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
4 # Test C++ support: test kde-format and format recognition heuristics.
6 cat <<\EOF > xg-c-17.cc
7 /* When xgettext has no info, it flags both c-format and kde-format, based
9 gettext ("used time: %1m %2s");
11 /* When the programmer says it's kde-format, xgettext does not apply the
13 /* xgettext: kde-format */
14 gettext ("remaining time: %1m %2s");
17 : ${XGETTEXT=xgettext}
18 ${XGETTEXT} --omit-header --no-location -d xg-c-17.tmp --language=C++ --kde \
20 LC_ALL=C tr -d '\r' < xg-c-17.tmp.po > xg-c-17.po || exit 1
22 cat <<EOF > xg-c-17.ok
23 #, c-format, kde-format
24 msgid "used time: %1m %2s"
28 msgid "remaining time: %1m %2s"
33 ${DIFF} xg-c-17.ok xg-c-17.po