1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test --translated option with Java .properties syntax.
5
6cat <<\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
16with\ 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=
30EOF
31
32: ${MSGATTRIB=msgattrib}
33${MSGATTRIB} --translated --properties-input --properties-output -o ma-s-1.tmp ma-s-1.properties || Exit 1
34LC_ALL=C tr -d '\r' < ma-s-1.tmp > ma-s-1.out || Exit 1
35
36cat <<\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
46with\ wives\ who\ never\ understand=und ihre Frauen verstehen sie nicht
47EOF
48
49: ${DIFF=diff}
50${DIFF} ma-s-1.ok ma-s-1.out
51result=$?
52
53exit $result
54