1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test C support: comments. 5 6cat <<EOF > xg-c-comment-2.c 7int 8main() 9{ 10 /* This is a comment which immediately before a keyword. */ 11 gettext ("1"); 12 13 // This 14 // one 15 // too 16 // although many blank lines come before the token itself. 17 18 19 20 21 gettext("2"); 22 23 /* this one also counts */ gettext ("3"); 24 25 gettext("4"); 26 27 /* this one is also copied */ nada 28 gettext ("5"); 29 30 /* I hope you do not see the following */ 31 break; 32 gettext("6"); 33 34 /* An unnice 35 multi-line comment */ evil; 36 gettext("7"); 37} 38EOF 39 40: ${XGETTEXT=xgettext} 41${XGETTEXT} --omit-header --no-location -c --c++ -d xg-c-comment-2.tmp xg-c-comment-2.c || Exit 1 42LC_ALL=C tr -d '\r' < xg-c-comment-2.tmp.po > xg-c-comment-2.po || Exit 1 43 44cat <<EOF > xg-c-comment-2.ok 45#. This is a comment which immediately before a keyword. 46msgid "1" 47msgstr "" 48 49#. This 50#. one 51#. too 52#. although many blank lines come before the token itself. 53msgid "2" 54msgstr "" 55 56#. this one also counts 57msgid "3" 58msgstr "" 59 60msgid "4" 61msgstr "" 62 63#. this one is also copied 64msgid "5" 65msgstr "" 66 67msgid "6" 68msgstr "" 69 70#. An unnice 71#. multi-line comment 72msgid "7" 73msgstr "" 74EOF 75 76: ${DIFF=diff} 77${DIFF} xg-c-comment-2.ok xg-c-comment-2.po 78result=$? 79 80exit $result 81 82Local Variables: 83 nuke-trailing-whitespace-p:nil 84End: 85