No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgcomm-15
blob06f558e8e0de689741dd6ef37cafab845bee4620
1 #! /bin/sh
3 # Test that without --force-po option, a PO file without translations is
4 # not created.
6 tmpfiles=""
7 trap 'rm -fr $tmpfiles' 1 2 3 15
9 # no unique msg in input files.
10 # with --force-po create an empty PO file; cf. msgcomm-14
12 tmpfiles="$tmpfiles mcomm-test15.in1 mcomm-test15.in2 mcomm-test15.in3"
13 cat <<EOF > mcomm-test15.in1
14 msgid ""
15 msgstr ""
16 "Project-Id-Version: GNU one 1.2.3\n"
17 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
18 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
19 "Last-Translator: Karl Eichwalder <ke@suse.de>\n"
20 "Language-Team: German <de@li.org>\n"
21 "MIME-Version: 1.0\n"
22 "Content-Type: text/plain; charset=iso-8859-1\n"
23 "Content-Transfer-Encoding: 8bit\n"
25 # occurs 3 times
26 #: first.c:123
27 msgid "1"
28 msgstr "1x"
29 EOF
31 cat <<EOF > mcomm-test15.in2
32 msgid ""
33 msgstr ""
34 "Project-Id-Version: GNU one 1.2.3\n"
35 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
36 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
37 "Last-Translator: Karl Eichwalder <ke@suse.de>\n"
38 "Language-Team: German <de@li.org>\n"
39 "MIME-Version: 1.0\n"
40 "Content-Type: text/plain; charset=iso-8859-1\n"
41 "Content-Transfer-Encoding: 8bit\n"
43 #: hunt.c:759
44 msgid "1"
45 msgstr ""
46 EOF
48 cat <<EOF > mcomm-test15.in3
49 msgid ""
50 msgstr ""
51 "Project-Id-Version: GNU one 1.2.3\n"
52 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
53 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
54 "Last-Translator: Karl Eichwalder <ke@suse.de>\n"
55 "Language-Team: German <de@li.org>\n"
56 "MIME-Version: 1.0\n"
57 "Content-Type: text/plain; charset=iso-8859-1\n"
58 "Content-Transfer-Encoding: 8bit\n"
60 #: hunt.c:789
61 msgid "1"
62 msgstr ""
63 EOF
65 tmpfiles="$tmpfiles mcomm-test15.out"
66 rm -f mcomm-test15.out
68 : ${MSGCOMM=msgcomm}
70 # --unique is shorthand for --less-than=2; do we've to test both
71 # switches? Are 'for' loops allowed? -ke-
72 ${MSGCOMM} --less-than=2 --no-location -o mcomm-test15.out \
73 mcomm-test15.in1 mcomm-test15.in2 mcomm-test15.in3
74 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
76 # we've no unique msg; thus no PO should be created.
77 if test -f mcomm-test15.out; then
78 echo "mcomm-test15.out wrongly written."
79 result=1
80 else
81 result=0
84 rm -fr $tmpfiles
86 exit $result