Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgmerge-properties-2
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test --update: location changed, and xgettext comment added. Both changes
5 # must be reflected in the resulting PO file. With Java .properties syntax.
6
7 cat <<\EOF > mm-p-2.po
8 #: cogarithmetic.cc:12
9 white=wei\u00df
10 EOF
11
12 cat <<EOF > mm-p-2.pot
13 #. location changed
14 #: cogarithmetic.cc:33
15 !white=
16 EOF
17
18 : ${MSGMERGE=msgmerge}
19 ${MSGMERGE} -q --properties-input --update mm-p-2.po mm-p-2.pot || exit 1
20 mv mm-p-2.po mm-p-2.tmp || { exit 1; }
21 LC_ALL=C tr -d '\r' < mm-p-2.tmp > mm-p-2.po || exit 1
22
23 cat <<\EOF > mm-p-2.ok
24 #. location changed
25 #: cogarithmetic.cc:33
26 white=wei\u00df
27 EOF
28
29 : ${DIFF=diff}
30 ${DIFF} mm-p-2.ok mm-p-2.po
31 result=$?
32
33 exit $result