No empty .Rs/.Re
[netbsd-mini2440.git] / gnu / dist / gettext / gettext-tools / tests / msgcomm-12
blob4f24895bf277915739ce0e0f0d6594d3ca7d4d76
1 #! /bin/sh
3 # Test that --less-than=2 removes entries which occur twice and keeps entries
4 # which occur only once.
6 tmpfiles=""
7 trap 'rm -fr $tmpfiles' 1 2 3 15
9 # unique msg in in3
11 tmpfiles="$tmpfiles mcomm-test12.in1 mcomm-test12.in2 mcomm-test12.in3"
12 cat <<EOF > mcomm-test12.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 # duplicate (cf. in2)
25 #: first.c:123
26 msgid "1"
27 msgstr "1x"
28 EOF
30 cat <<EOF > mcomm-test12.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 # duplicate (cf. in1)
43 #: hunt.c:759
44 msgid "1"
45 msgstr ""
46 EOF
48 cat <<EOF > mcomm-test12.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 # unique
61 #: hunt.c:890
62 msgid "2"
63 msgstr ""
64 EOF
66 tmpfiles="$tmpfiles mcomm-test12.out"
67 : ${MSGCOMM=msgcomm}
69 # --unique is shorthand for --less-than=2; do we've to test both
70 # switches? Are 'for' loops allowed? -ke-
71 ${MSGCOMM} --less-than=2 --no-location --force-po -o mcomm-test12.out \
72 mcomm-test12.in1 mcomm-test12.in2 mcomm-test12.in3
73 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
75 tmpfiles="$tmpfiles mcomm-test12.ok"
76 cat << EOF > mcomm-test12.ok
77 msgid ""
78 msgstr ""
79 "Project-Id-Version: GNU one 1.2.3\n"
80 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
81 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
82 "Last-Translator: Karl Eichwalder <ke@suse.de>\n"
83 "Language-Team: German <de@li.org>\n"
84 "MIME-Version: 1.0\n"
85 "Content-Type: text/plain; charset=iso-8859-1\n"
86 "Content-Transfer-Encoding: 8bit\n"
88 # unique
89 msgid "2"
90 msgstr ""
91 EOF
93 : ${DIFF=diff}
94 ${DIFF} mcomm-test12.ok mcomm-test12.out
95 result=$?
97 rm -fr $tmpfiles
99 exit $result