Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgmerge-compendium-2
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test compendium option with fuzziness.
5
6 cat <<EOF > mm-c-2.in1
7 #: file.c:123
8 msgid "1"
9 msgstr "1x"
10 EOF
11
12 cat <<EOF > mm-c-2.com
13 #: file.c:345
14 msgid "one, two, three"
15 msgstr "1, 2, 3"
16 EOF
17
18 cat <<EOF > mm-c-2.pot
19 #: file.c:123
20 msgid "1"
21 msgstr ""
22
23 #: file.c:345
24 msgid "one, two, three..."
25 msgstr ""
26 EOF
27
28 : ${MSGMERGE=msgmerge}
29 ${MSGMERGE} -q -C mm-c-2.com -o mm-c-2.tmp mm-c-2.in1 mm-c-2.pot || exit 1
30 LC_ALL=C tr -d '\r' < mm-c-2.tmp > mm-c-2.out || exit 1
31
32 cat << EOF > mm-c-2.ok
33 #: file.c:123
34 msgid "1"
35 msgstr "1x"
36
37 #: file.c:345
38 #, fuzzy
39 msgid "one, two, three..."
40 msgstr "1, 2, 3"
41 EOF
42
43 : ${DIFF=diff}
44 ${DIFF} mm-c-2.ok mm-c-2.out
45 result=$?
46
47 exit $result