~win-cross-dev/win-cross/gettext

« back to all changes in this revision

Viewing changes to gettext-tools/tests/msgmerge-properties-2

  • Committer: Nathan Osman
  • Date: 2012-08-11 05:06:52 UTC
  • Revision ID: admin@quickmediasolutions.com-20120811050652-ochkxjtonbw6kkve
Initial commit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
 
 
3
# Test --update: location changed, and xgettext comment added. Both changes
 
4
# must be reflected in the resulting PO file. With Java .properties syntax.
 
5
 
 
6
tmpfiles=""
 
7
trap 'rm -fr $tmpfiles' 1 2 3 15
 
8
 
 
9
tmpfiles="$tmpfiles mm-p-2.po"
 
10
cat <<\EOF > mm-p-2.po
 
11
#: cogarithmetic.cc:12
 
12
white=wei\u00df
 
13
EOF
 
14
 
 
15
tmpfiles="$tmpfiles mm-p-2.pot"
 
16
cat <<EOF > mm-p-2.pot
 
17
#. location changed
 
18
#: cogarithmetic.cc:33
 
19
!white=
 
20
EOF
 
21
 
 
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; }
 
29
 
 
30
tmpfiles="$tmpfiles mm-p-2.ok"
 
31
cat <<\EOF > mm-p-2.ok
 
32
#. location changed
 
33
#: cogarithmetic.cc:33
 
34
white=wei\u00df
 
35
EOF
 
36
 
 
37
: ${DIFF=diff}
 
38
${DIFF} mm-p-2.ok mm-p-2.po
 
39
result=$?
 
40
 
 
41
rm -fr $tmpfiles
 
42
 
 
43
exit $result