1#! /bin/sh 2 3# Test C support: comments meant for xgettext, and whitespace. 4 5tmpfiles="" 6trap 'rm -fr $tmpfiles' 1 2 3 15 7 8tmpfiles="$tmpfiles xg-c-2.in.c" 9cat <<EOF > xg-c-2.in.c 10This is a test of the xgettext functionality. 11/* xgettext:no-c-format */ 12_("extract me") 13Sometimes keywords can be spread apart 14xgettext:no-c-format 15_ ( "what about me" ) 16And even further on accasion 17_ 18( 19"hello" 20) 21EOF 22 23tmpfiles="$tmpfiles xg-c-2.po" 24: ${XGETTEXT=xgettext} 25${XGETTEXT} -d xg-c-2 -k_ --omit-header --no-location xg-c-2.in.c 26test $? = 0 || { rm -fr $tmpfiles; exit 1; } 27 28tmpfiles="$tmpfiles xg-c-2.ok" 29cat <<EOF > xg-c-2.ok 30#, no-c-format 31msgid "extract me" 32msgstr "" 33 34msgid "what about me" 35msgstr "" 36 37msgid "hello" 38msgstr "" 39EOF 40 41: ${DIFF=diff} 42${DIFF} xg-c-2.ok xg-c-2.po 43result=$? 44 45rm -fr $tmpfiles 46 47exit $result 48