No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / xgettext-7
blob20a4de0601facd45459869acd348a72015fd4407
1 #!/bin/sh
3 # Test of comment extraction in the case of duplicated msgids.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 tmpfiles="$tmpfiles xg-test7.c"
9 cat <<\EOF > xg-test7.c
10 /* first comment */
11 /* xgettext: c-format */
12 gettext ("abc");
14 /* first comment */
15 /* xgettext: lisp-format */
16 gettext ("abc");
18 /* second comment */
19 /* xgettext: python-format */
20 gettext ("abc");
21 EOF
23 tmpfiles="$tmpfiles xg-test7.po"
24 : ${XGETTEXT=xgettext}
25 ${XGETTEXT} --omit-header --add-comments -d xg-test7 xg-test7.c
26 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
28 tmpfiles="$tmpfiles xg-test7.ok"
29 cat <<\EOF > xg-test7.ok
30 #. first comment
31 #. second comment
32 #: xg-test7.c:3 xg-test7.c:7 xg-test7.c:11
33 #, c-format, python-format, lisp-format
34 msgid "abc"
35 msgstr ""
36 EOF
38 : ${DIFF=diff}
39 ${DIFF} xg-test7.ok xg-test7.po
40 result=$?
42 rm -fr $tmpfiles
44 exit $result