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