1#! /bin/sh
2
3# -u, --unique (equivalent to --less-than=2): we are interested in unique
4# entries only (entries occuring less than 2 times).  But don't drop the
5# header entry; otherwise msgcomm will fail for multibyte strings.
6
7tmpfiles=""
8trap 'rm -fr $tmpfiles' 1 2 3 15
9
10tmpfiles="$tmpfiles mcomm-test17.in1 mcomm-test17.in2 mcomm-test17.in3"
11cat <<EOF > mcomm-test17.in1
12msgid ""
13msgstr ""
14"Project-Id-Version: GNU one 1.2.3\n"
15"POT-Creation-Date: 2000-12-11 20:49+0100\n"
16"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
17"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
18"Language-Team: German <de@li.org>\n"
19"MIME-Version: 1.0\n"
20"Content-Type: text/plain; charset=ISO-8859-1\n"
21"Content-Transfer-Encoding: 8bit\n"
22
23# occurs 3 times
24#: first.c:123
25msgid "1"
26msgstr "1x"
27EOF
28
29cat <<EOF > mcomm-test17.in2
30msgid ""
31msgstr ""
32"Project-Id-Version: GNU one 1.2.3\n"
33"POT-Creation-Date: 2000-12-11 20:49+0100\n"
34"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
35"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
36"Language-Team: German <de@li.org>\n"
37"MIME-Version: 1.0\n"
38"Content-Type: text/plain; charset=ISO-8859-1\n"
39"Content-Transfer-Encoding: 8bit\n"
40
41#: hunt.c:759
42msgid "1"
43msgstr ""
44EOF
45
46cat <<\EOF > mcomm-test17.in3
47msgid ""
48msgstr ""
49"Project-Id-Version: GNU one 1.2.3\n"
50"POT-Creation-Date: 2000-12-11 20:49+0100\n"
51"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
52"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
53"Language-Team: German <de@li.org>\n"
54"MIME-Version: 1.0\n"
55"Content-Type: text/plain; charset=ISO-8859-1\n"
56"Content-Transfer-Encoding: 8bit\n"
57
58#: hunt.c:789
59msgid "1"
60msgstr ""
61
62# unique
63#: hunt.c:890
64msgid "5"
65msgstr "f�nf"
66EOF
67
68tmpfiles="$tmpfiles mcomm-test17.out"
69: ${MSGCOMM=msgcomm}
70
71${MSGCOMM} -u \
72           -o mcomm-test17.out \
73           mcomm-test17.in1 mcomm-test17.in2 mcomm-test17.in3
74test $? = 0 || { rm -fr $tmpfiles; exit 1; }
75
76tmpfiles="$tmpfiles mcomm-test17.ok"
77cat << \EOF > mcomm-test17.ok
78msgid ""
79msgstr ""
80"Project-Id-Version: GNU one 1.2.3\n"
81"POT-Creation-Date: 2000-12-11 20:49+0100\n"
82"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
83"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
84"Language-Team: German <de@li.org>\n"
85"MIME-Version: 1.0\n"
86"Content-Type: text/plain; charset=ISO-8859-1\n"
87"Content-Transfer-Encoding: 8bit\n"
88
89# unique
90#: hunt.c:890
91msgid "5"
92msgstr "f�nf"
93EOF
94
95: ${DIFF=diff}
96${DIFF} mcomm-test17.ok mcomm-test17.out
97result=$?
98
99rm -fr $tmpfiles
100
101exit $result
102