Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgmerge-4
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test handling of comments.
5
6 cat <<EOF > mm-test4.in1.po
7 msgid "one"
8 msgstr "eins"
9 # This comment should be copied.
10 msgid "two"
11 msgstr "zwei"
12
13
14 # And this one, too.
15 #~ msgid "four"
16 #~ msgstr "vier"
17 EOF
18
19 cat <<EOF > mm-test4.in2.po
20 msgid "one"
21 msgstr ""
22 # This is a comment in the POT file.
23 msgid "three"
24 msgstr ""
25 EOF
26
27 : ${MSGMERGE=msgmerge}
28 ${MSGMERGE} -q -o mm-test4.tmp mm-test4.in1.po mm-test4.in2.po || exit 1
29 LC_ALL=C tr -d '\r' < mm-test4.tmp > mm-test4.out || exit 1
30
31 cat <<EOF > mm-test4.ok
32 msgid "one"
33 msgstr "eins"
34
35 # This is a comment in the POT file.
36 msgid "three"
37 msgstr ""
38
39 # This comment should be copied.
40 #~ msgid "two"
41 #~ msgstr "zwei"
42
43 # And this one, too.
44 #~ msgid "four"
45 #~ msgstr "vier"
46 EOF
47
48 : ${DIFF=diff}
49 ${DIFF} mm-test4.ok mm-test4.out
50 result=$?
51
52 exit $result