No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgcomm-13
blobbbccd5d0e1df4d832e71a31aa784d491431d6bde
1 #! /bin/sh
3 # Test that --less-than=2 removes entries which occur more than twice.
5 tmpfiles=""
6 trap 'rm -fr $tmpfiles' 1 2 3 15
8 # one msg occurs 3 times (has to go away).
9 # An unique msg in in3 has to stay.
11 tmpfiles="$tmpfiles mcomm-test13.in1 mcomm-test13.in2 mcomm-test13.in3"
12 cat <<EOF > mcomm-test13.in1
13 msgid ""
14 msgstr ""
15 "Project-Id-Version: GNU one 1.2.3\n"
16 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
17 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
18 "Last-Translator: Karl Eichwalder <ke@suse.de>\n"
19 "Language-Team: German <de@li.org>\n"
20 "MIME-Version: 1.0\n"
21 "Content-Type: text/plain; charset=iso-8859-1\n"
22 "Content-Transfer-Encoding: 8bit\n"
24 # occurs 3 times
25 #: first.c:123
26 msgid "1"
27 msgstr "1x"
28 EOF
30 cat <<EOF > mcomm-test13.in2
31 msgid ""
32 msgstr ""
33 "Project-Id-Version: GNU one 1.2.3\n"
34 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
35 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
36 "Last-Translator: Karl Eichwalder <ke@suse.de>\n"
37 "Language-Team: German <de@li.org>\n"
38 "MIME-Version: 1.0\n"
39 "Content-Type: text/plain; charset=iso-8859-1\n"
40 "Content-Transfer-Encoding: 8bit\n"
42 #: hunt.c:759
43 msgid "1"
44 msgstr ""
45 EOF
47 cat <<EOF > mcomm-test13.in3
48 msgid ""
49 msgstr ""
50 "Project-Id-Version: GNU one 1.2.3\n"
51 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
52 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
53 "Last-Translator: Karl Eichwalder <ke@suse.de>\n"
54 "Language-Team: German <de@li.org>\n"
55 "MIME-Version: 1.0\n"
56 "Content-Type: text/plain; charset=iso-8859-1\n"
57 "Content-Transfer-Encoding: 8bit\n"
59 #: hunt.c:789
60 msgid "1"
61 msgstr ""
63 # unique
64 #: hunt.c:890
65 msgid "2"
66 msgstr ""
67 EOF
69 tmpfiles="$tmpfiles mcomm-test13.out"
70 : ${MSGCOMM=msgcomm}
72 # --unique is shorthand for --less-than=2; do we've to test both
73 # switches? Are 'for' loops allowed? -ke-
74 ${MSGCOMM} --less-than=2 --no-location --force-po -o mcomm-test13.out \
75 mcomm-test13.in1 mcomm-test13.in2 mcomm-test13.in3
76 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
78 tmpfiles="$tmpfiles mcomm-test13.ok"
79 cat << EOF > mcomm-test13.ok
80 msgid ""
81 msgstr ""
82 "Project-Id-Version: GNU one 1.2.3\n"
83 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
84 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
85 "Last-Translator: Karl Eichwalder <ke@suse.de>\n"
86 "Language-Team: German <de@li.org>\n"
87 "MIME-Version: 1.0\n"
88 "Content-Type: text/plain; charset=iso-8859-1\n"
89 "Content-Transfer-Encoding: 8bit\n"
91 # unique
92 msgid "2"
93 msgstr ""
94 EOF
96 : ${DIFF=diff}
97 ${DIFF} mcomm-test13.ok mcomm-test13.out
98 result=$?
100 rm -fr $tmpfiles
102 exit $result