blob: ffc0f1b5416db1cd7e71d8214a79c3cd496e9a51 [file] [log] [blame]
#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
# Test C support: valid but unlikely C format strings are _not_ marked as
# c-format by default.
cat <<\EOF > xg-c-format-1.c
gettext ("%1% on, %2% off");
EOF
: ${XGETTEXT=xgettext}
${XGETTEXT} --omit-header --no-location -d xg-c-format-1.tmp xg-c-format-1.c || Exit 1
LC_ALL=C tr -d '\r' < xg-c-format-1.tmp.po > xg-c-format-1.po || Exit 1
cat <<EOF > xg-c-format-1.ok
msgid "%1% on, %2% off"
msgstr ""
EOF
: ${DIFF=diff}
${DIFF} xg-c-format-1.ok xg-c-format-1.po
result=$?
exit $result