1#!/bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test C support: --add-comments option. 5 6cat <<\EOF > xg-c-comment-3.c 7/* a */ 8/* b */ char *string = /* c */ 9/* d */ 10/* e */ _( /* f */ "hello " /* g */ "world" /* h */ ); 11EOF 12 13: ${XGETTEXT=xgettext} 14${XGETTEXT} --add-comments --omit-header --no-location --keyword=_ \ 15 -d xg-c-comment-3.tmp xg-c-comment-3.c || Exit 1 16LC_ALL=C tr -d '\r' < xg-c-comment-3.tmp.po > xg-c-comment-3.po || Exit 1 17 18cat <<EOF > xg-c-comment-3.ok 19#. a 20#. b 21#. c 22#. d 23#. e 24#. f 25msgid "hello world" 26msgstr "" 27EOF 28 29: ${DIFF=diff} 30${DIFF} xg-c-comment-3.ok xg-c-comment-3.po 31result=$? 32 33exit $result 34