No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-c-2
blob5bbf0569786ec34aa468933bf2bef04bd18729ba
1 #! /bin/sh
3 # Test C support: comments meant for xgettext, and whitespace.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-c-2.in.c"
9 cat <<EOF > xg-c-2.in.c
10 This is a test of the xgettext functionality.
11 /* xgettext:no-c-format */
12 _("extract me")
13 Sometimes keywords can be spread apart
14 xgettext:no-c-format
15 _ ( "what about me" )
16 And even further on accasion
19 "hello"
21 EOF
23 tmpfiles="$tmpfiles xg-c-2.po"
24 : ${XGETTEXT=xgettext}
25 ${XGETTEXT} -d xg-c-2 -k_ --omit-header --no-location xg-c-2.in.c
26 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
28 tmpfiles="$tmpfiles xg-c-2.ok"
29 cat <<EOF > xg-c-2.ok
30 #, no-c-format
31 msgid "extract me"
32 msgstr ""
34 msgid "what about me"
35 msgstr ""
37 msgid "hello"
38 msgstr ""
39 EOF
41 : ${DIFF=diff}
42 ${DIFF} xg-c-2.ok xg-c-2.po
43 result=$?
45 rm -fr $tmpfiles
47 exit $result