Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgcomm-7
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test --no-location and --omit-header options together.
5
6 cat <<EOF > mcomm-test7.in1
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: GNU one 1.2.3\n"
10 "POT-Creation-Date: 2000-12-11 20:49+0100\n"
11 "PO-Revision-Date: 2000-03-18 15:25+01:00\n"
12 "Last-Translator: Karl Eichwalder <ke@suse.de>\n"
13 "Language-Team: German <de@li.org>\n"
14 "MIME-Version: 1.0\n"
15 "Content-Type: text/plain; charset=iso-8859-1\n"
16 "Content-Transfer-Encoding: 8bit\n"
17
18 #: first.c:123
19 msgid "1"
20 msgstr "1x"
21 EOF
22
23 cat <<EOF > mcomm-test7.in2
24 #: hunt.c:759
25 msgid "2"
26 msgstr "2x"
27 EOF
28
29 : ${MSGCOMM=msgcomm}
30 ${MSGCOMM} --more-than=0 --no-location --omit-header -o mcomm-test7.tmp \
31     mcomm-test7.in1 mcomm-test7.in2 || exit 1
32 LC_ALL=C tr -d '\r' < mcomm-test7.tmp > mcomm-test7.out || exit 1
33
34 cat << EOF > mcomm-test7.ok
35 msgid "1"
36 msgstr "1x"
37
38 msgid "2"
39 msgstr "2x"
40 EOF
41
42 : ${DIFF=diff}
43 ${DIFF} mcomm-test7.ok mcomm-test7.out
44 result=$?
45
46 exit $result