3
# Test --update: location changed, and xgettext comment added. Both changes
4
# must be reflected in the resulting PO file. With Java .properties syntax.
7
trap 'rm -fr $tmpfiles' 1 2 3 15
9
tmpfiles="$tmpfiles mm-p-2.po"
10
cat <<\EOF > mm-p-2.po
11
#: cogarithmetic.cc:12
15
tmpfiles="$tmpfiles mm-p-2.pot"
16
cat <<EOF > mm-p-2.pot
18
#: cogarithmetic.cc:33
22
tmpfiles="$tmpfiles mm-p-2.po~ mm-p-2.tmp"
23
: ${MSGMERGE=msgmerge}
24
${MSGMERGE} -q --properties-input --update mm-p-2.po mm-p-2.pot
25
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
26
mv mm-p-2.po mm-p-2.tmp || { rm -fr $tmpfiles; exit 1; }
27
LC_ALL=C tr -d '\r' < mm-p-2.tmp > mm-p-2.po
28
test $? = 0 || { rm -fr $tmpfiles; exit 1; }
30
tmpfiles="$tmpfiles mm-p-2.ok"
31
cat <<\EOF > mm-p-2.ok
33
#: cogarithmetic.cc:33
38
${DIFF} mm-p-2.ok mm-p-2.po