No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-c-6
blob757e9c3a802a8625c7a6e6c8e36efe37f47d615b
1 #! /bin/sh
3 # Test C support: --add-comments option.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-c-6.in.C"
9 cat <<EOF > xg-c-6.in.C
10 /* This comment will not be extracted. */
11 gettext ("help");
13 /* XXX: But this one will. */
14 gettext_noop ("me");
16 //XXX: ..and this
17 dcgettext ("foo", "quick", LC_MESSAGES);
19 /* not not not */
20 dgettext ("bar", "!");
21 EOF
23 tmpfiles="$tmpfiles xg-c-6.po"
24 : ${XGETTEXT=xgettext}
25 ${XGETTEXT} --omit-header --no-location --add-comments=XXX xg-c-6.in.C \
26 -d xg-c-6
27 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
29 tmpfiles="$tmpfiles xg-c-6.ok"
30 cat <<EOF > xg-c-6.ok
31 msgid "help"
32 msgstr ""
34 #. XXX: But this one will.
35 msgid "me"
36 msgstr ""
38 #. XXX: ..and this
39 msgid "quick"
40 msgstr ""
42 msgid "!"
43 msgstr ""
44 EOF
46 : ${DIFF=diff}
47 ${DIFF} xg-c-6.ok xg-c-6.po
48 result=$?
50 rm -fr $tmpfiles
52 exit $result