• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test that --less-than=2 removes entries which occur twice and keeps entries
5# which occur only once.
6
7# unique msg in in3
8
9cat <<EOF > mcomm-test12.in1
10msgid ""
11msgstr ""
12"Project-Id-Version: GNU one 1.2.3\n"
13"POT-Creation-Date: 2000-12-11 20:49+0100\n"
14"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
15"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
16"Language-Team: German <de@li.org>\n"
17"MIME-Version: 1.0\n"
18"Content-Type: text/plain; charset=iso-8859-1\n"
19"Content-Transfer-Encoding: 8bit\n"
20
21# duplicate (cf. in2)
22#: first.c:123
23msgid "1"
24msgstr "1x"
25EOF
26
27cat <<EOF > mcomm-test12.in2
28msgid ""
29msgstr ""
30"Project-Id-Version: GNU one 1.2.3\n"
31"POT-Creation-Date: 2000-12-11 20:49+0100\n"
32"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
33"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
34"Language-Team: German <de@li.org>\n"
35"MIME-Version: 1.0\n"
36"Content-Type: text/plain; charset=iso-8859-1\n"
37"Content-Transfer-Encoding: 8bit\n"
38
39# duplicate (cf. in1)
40#: hunt.c:759
41msgid "1"
42msgstr ""
43EOF
44
45cat <<EOF > mcomm-test12.in3
46msgid ""
47msgstr ""
48"Project-Id-Version: GNU one 1.2.3\n"
49"POT-Creation-Date: 2000-12-11 20:49+0100\n"
50"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
51"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
52"Language-Team: German <de@li.org>\n"
53"MIME-Version: 1.0\n"
54"Content-Type: text/plain; charset=iso-8859-1\n"
55"Content-Transfer-Encoding: 8bit\n"
56
57# unique
58#: hunt.c:890
59msgid "2"
60msgstr ""
61EOF
62
63: ${MSGCOMM=msgcomm}
64
65# --unique is shorthand for --less-than=2; do we've to test both
66# switches?  Are 'for' loops allowed? -ke-
67${MSGCOMM} --less-than=2 --no-location --force-po -o mcomm-test12.tmp \
68    mcomm-test12.in1 mcomm-test12.in2 mcomm-test12.in3 || Exit 1
69LC_ALL=C tr -d '\r' < mcomm-test12.tmp > mcomm-test12.out || Exit 1
70
71cat << EOF > mcomm-test12.ok
72msgid ""
73msgstr ""
74"Project-Id-Version: GNU one 1.2.3\n"
75"POT-Creation-Date: 2000-12-11 20:49+0100\n"
76"PO-Revision-Date: 2000-03-18 15:25+01:00\n"
77"Last-Translator: Karl Eichwalder <ke@suse.de>\n"
78"Language-Team: German <de@li.org>\n"
79"MIME-Version: 1.0\n"
80"Content-Type: text/plain; charset=iso-8859-1\n"
81"Content-Transfer-Encoding: 8bit\n"
82
83# unique
84msgid "2"
85msgstr ""
86EOF
87
88: ${DIFF=diff}
89${DIFF} mcomm-test12.ok mcomm-test12.out
90result=$?
91
92exit $result
93