1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test C support: --add-comments option. 5 6cat <<EOF > xg-c-comment-4.in.C 7/* This comment will not be extracted. */ 8gettext ("help"); 9 10/* XXX: But this one will. */ 11gettext_noop ("me"); 12 13//XXX: ..and this 14dcgettext ("foo", "quick", LC_MESSAGES); 15 16 /* not not not */ 17dgettext ("bar", "!"); 18EOF 19 20: ${XGETTEXT=xgettext} 21${XGETTEXT} --omit-header --no-location --add-comments=XXX \ 22 -d xg-c-comment-4.tmp xg-c-comment-4.in.C || Exit 1 23LC_ALL=C tr -d '\r' < xg-c-comment-4.tmp.po > xg-c-comment-4.po || Exit 1 24 25cat <<EOF > xg-c-comment-4.ok 26msgid "help" 27msgstr "" 28 29#. XXX: But this one will. 30msgid "me" 31msgstr "" 32 33#. XXX: ..and this 34msgid "quick" 35msgstr "" 36 37msgid "!" 38msgstr "" 39EOF 40 41: ${DIFF=diff} 42${DIFF} xg-c-comment-4.ok xg-c-comment-4.po 43result=$? 44 45exit $result 46