No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-c-3
blob182c833c51098a9176a737335110d45600bf115f
1 #! /bin/sh
3 # Test C support: recognition of #line.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-c-3.in.c"
9 cat <<EOF > xg-c-3.in.c
10 #line 42 "bozo"
11 main(){printf(gettext("Hello, World!\n"));}
12 # 6 "clown"
13 gettext("nothing");
14 EOF
16 tmpfiles="$tmpfiles xg-c-3.po"
17 : ${XGETTEXT=xgettext}
18 ${XGETTEXT} --omit-header --add-location xg-c-3.in.c -d xg-c-3
19 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
21 tmpfiles="$tmpfiles xg-c-3.ok"
22 cat <<EOF > xg-c-3.ok
23 #: bozo:42
24 #, c-format
25 msgid "Hello, World!\n"
26 msgstr ""
28 #: clown:6
29 msgid "nothing"
30 msgstr ""
31 EOF
33 : ${DIFF=diff}
34 ${DIFF} xg-c-3.ok xg-c-3.po
35 result=$?
37 rm -fr $tmpfiles
39 exit $result