No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-c-5
bloba63f50da5b5da235422494a28fe37473ffba3d7a
1 #! /bin/sh
3 # Test C support: comments.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-c-5.in.cc"
9 cat <<EOF > xg-c-5.in.cc
10 main(){printf(gettext/*puke*/(/*barf*/"Hello, " "World!" "\n")); }
11 EOF
13 tmpfiles="$tmpfiles xg-c-5.po"
14 : ${XGETTEXT=xgettext}
15 ${XGETTEXT} --omit-header --no-location --add-comments xg-c-5.in.cc -d xg-c-5
16 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
18 tmpfiles="$tmpfiles xg-c-5.ok"
19 cat <<EOF > xg-c-5.ok
20 #. puke
21 #. barf
22 #, c-format
23 msgid "Hello, World!\n"
24 msgstr ""
25 EOF
27 : ${DIFF=diff}
28 ${DIFF} xg-c-5.ok xg-c-5.po
29 result=$?
31 rm -fr $tmpfiles
33 exit $result