blob: a8cb39bdb06a7b8155fb155504d06e4ef7e61494 [file] [log] [blame]
#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src
# Test C support: comments.
cat <<EOF > xg-c-comment-1.in.cc
main(){printf(gettext/*puke*/(/*barf*/"Hello, " "World!" "\n")); }
EOF
: ${XGETTEXT=xgettext}
${XGETTEXT} --omit-header --no-location --add-comments -d xg-c-comment-1.tmp xg-c-comment-1.in.cc || Exit 1
LC_ALL=C tr -d '\r' < xg-c-comment-1.tmp.po > xg-c-comment-1.po || Exit 1
cat <<EOF > xg-c-comment-1.ok
#. puke
#. barf
#, c-format
msgid "Hello, World!\n"
msgstr ""
EOF
: ${DIFF=diff}
${DIFF} xg-c-comment-1.ok xg-c-comment-1.po
result=$?
exit $result