Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgattrib-properties-1
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test --translated option with Java .properties syntax.
5
6 cat <<\EOF > ma-s-1.properties
7 # HEADER.
8 #
9 !=Project-Id-Version\: Bonnie Tyler\n
10
11 #: married-men:4
12 #, fuzzy
13 !The\ world\ is\ full\ of\ married\ men=So viele verheiratete M\u00e4nner
14
15 #: married-men:5
16 with\ wives\ who\ never\ understand=und ihre Frauen verstehen sie nicht
17
18 #: married-men:6
19 !They're\ looking\ for\ someone\ to\ share=
20
21 # schwer zu \u00fcbersetzen...
22 #: married-men:7
23 !the\ excitement\ of\ a\ love\ affair=
24
25 #: married-men:8
26 !Just\ as\ soon\ as\ they\ find\ you=
27
28 #: married-men:9
29 !They\ warn\ you\ and\ darn\ you=
30 EOF
31
32 : ${MSGATTRIB=msgattrib}
33 ${MSGATTRIB} --translated --properties-input --properties-output -o ma-s-1.tmp ma-s-1.properties || exit 1
34 LC_ALL=C tr -d '\r' < ma-s-1.tmp > ma-s-1.out || exit 1
35
36 cat <<\EOF > ma-s-1.ok
37 # HEADER.
38 #
39 !=Project-Id-Version\: Bonnie Tyler\n
40
41 #: married-men:4
42 #, fuzzy
43 !The\ world\ is\ full\ of\ married\ men=So viele verheiratete M\u00e4nner
44
45 #: married-men:5
46 with\ wives\ who\ never\ understand=und ihre Frauen verstehen sie nicht
47 EOF
48
49 : ${DIFF=diff}
50 ${DIFF} ma-s-1.ok ma-s-1.out
51 result=$?
52
53 exit $result