• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
9cat <<EOF > mcomm-test14.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# occurs 3 times
22#: first.c:123
23msgid "1"
24msgstr "1x"
25EOF
26
27cat <<EOF > mcomm-test14.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#: hunt.c:759
40msgid "1"
41msgstr ""
42EOF
43
44cat <<EOF > mcomm-test14.in3
45msgid ""
46msgstr ""
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
57msgid "1"
58msgstr ""
59EOF
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
67LC_ALL=C tr -d '\r' < mcomm-test14.tmp > mcomm-test14.out || Exit 1
68
69cat << EOF > mcomm-test14.ok
70msgid ""
71msgstr ""
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"
80EOF
81
82: ${DIFF=diff}
83${DIFF} mcomm-test14.ok mcomm-test14.out
84result=$?
85
86exit $result
87