Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgmerge-compendium-4
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test compendium option.  Use it there was no "old" PO file at all
5 # (merely use /dev/null).
6
7
8 cat <<\EOF > mm-c-4.com
9 msgid ""
10 msgstr ""
11 "Content-Type: text/plain; charset=iso-8859-1\n"
12 "Content-Transfer-Encoding: 8bit\n"
13
14 #: file.c:345
15 msgid "5"
16 msgstr "fünf"
17 EOF
18
19 cat <<EOF > mm-c-4.pot
20 #: file.c:123
21 msgid "1"
22 msgstr ""
23
24 #: file.c:345
25 msgid "5"
26 msgstr ""
27 EOF
28
29 : ${MSGMERGE=msgmerge}
30 ${MSGMERGE} -q --compendium mm-c-4.com -o mm-c-4.tmp /dev/null mm-c-4.pot || exit 1
31 LC_ALL=C tr -d '\r' < mm-c-4.tmp > mm-c-4.out || exit 1
32
33 cat << \EOF > mm-c-4.ok
34 msgid ""
35 msgstr ""
36 "Content-Type: text/plain; charset=iso-8859-1\n"
37 "Content-Transfer-Encoding: 8bit\n"
38
39 #: file.c:123
40 msgid "1"
41 msgstr ""
42
43 #: file.c:345
44 msgid "5"
45 msgstr "fünf"
46 EOF
47
48 : ${DIFF=diff}
49 ${DIFF} mm-c-4.ok mm-c-4.out
50 result=$?
51
52 exit $result