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