Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgcomm-14
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test --force-po option.
5
6 # no unique msg in input files.
7 # without --force-po don't create any PO file; cf. msgcomm-15
8
9 cat <<EOF > mcomm-test14.in1
10 msgid ""
11 msgstr ""
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 # occurs 3 times
22 #: first.c:123
23 msgid "1"
24 msgstr "1x"
25 EOF
26
27 cat <<EOF > mcomm-test14.in2
28 msgid ""
29 msgstr ""
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 #: hunt.c:759
40 msgid "1"
41 msgstr ""
42 EOF
43
44 cat <<EOF > mcomm-test14.in3
45 msgid ""
46 msgstr ""
47 "Project-Id-Version: GNU one 1.2.3\n"
48 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
49 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
50 "Last-Translator: Karl Eichwalder <ke@suse.de>\n"
51 "Language-Team: German <de@li.org>\n"
52 "MIME-Version: 1.0\n"
53 "Content-Type: text/plain; charset=iso-8859-1\n"
54 "Content-Transfer-Encoding: 8bit\n"
55
56 #: hunt.c:789
57 msgid "1"
58 msgstr ""
59 EOF
60
61 : ${MSGCOMM=msgcomm}
62
63 # --unique is shorthand for --less-than=2; do we've to test both
64 # switches?  Are 'for' loops allowed? -ke-
65 ${MSGCOMM} --less-than=2 --no-location --force-po -o mcomm-test14.tmp \
66     mcomm-test14.in1 mcomm-test14.in2 mcomm-test14.in3 || exit 1
67 LC_ALL=C tr -d '\r' < mcomm-test14.tmp > mcomm-test14.out || exit 1
68
69 cat << EOF > mcomm-test14.ok
70 msgid ""
71 msgstr ""
72 "Project-Id-Version: GNU one 1.2.3\n"
73 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
74 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
75 "Last-Translator: Karl Eichwalder <ke@suse.de>\n"
76 "Language-Team: German <de@li.org>\n"
77 "MIME-Version: 1.0\n"
78 "Content-Type: text/plain; charset=iso-8859-1\n"
79 "Content-Transfer-Encoding: 8bit\n"
80 EOF
81
82 : ${DIFF=diff}
83 ${DIFF} mcomm-test14.ok mcomm-test14.out
84 result=$?
85
86 exit $result