1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test of an external command with Java .properties syntax.
5
6cat <<\EOF > mex-test3.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
32cat <<\EOF > mex-test3.sh
33#! /bin/sh
34echo "========================= $MSGEXEC_LOCATION =========================" | LC_ALL=C tr -d '\r'
35cat <<MEOF
36$MSGEXEC_MSGID
37---
38MEOF
39cat
40echo | LC_ALL=C tr -d '\r'
41exit 0
42EOF
43chmod a+x mex-test3.sh
44
45: ${MSGEXEC=msgexec}
46${MSGEXEC} --properties-input -i mex-test3.properties ./mex-test3.sh > mex-test3.out || Exit 1
47
48cat <<\EOF > mex-test3.ok
49========================= mex-test3.properties:3 =========================
50
51---
52Project-Id-Version: Bonnie Tyler
53
54========================= mex-test3.properties:7 =========================
55The world is full of married men
56---
57So viele verheiratete Männer
58========================= mex-test3.properties:10 =========================
59with wives who never understand
60---
61und ihre Frauen verstehen sie nicht
62========================= mex-test3.properties:13 =========================
63They're looking for someone to share
64---
65
66========================= mex-test3.properties:17 =========================
67the excitement of a love affair
68---
69
70========================= mex-test3.properties:20 =========================
71Just as soon as they find you
72---
73
74========================= mex-test3.properties:23 =========================
75They warn you and darn you
76---
77
78EOF
79
80: ${DIFF=diff}
81${DIFF} mex-test3.ok mex-test3.out
82result=$?
83
84exit $result
85