• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/ap/gpl/timemachine/gettext-0.17/gettext-tools/tests/
1#! /bin/sh
2
3# Test --translated option with Java .properties syntax.
4
5tmpfiles=""
6trap 'rm -fr $tmpfiles' 1 2 3 15
7
8tmpfiles="$tmpfiles ma-s-1.properties"
9cat <<\EOF > ma-s-1.properties
10# HEADER.
11#
12!=Project-Id-Version\: Bonnie Tyler\n
13
14#: married-men:4
15#, fuzzy
16!The\ world\ is\ full\ of\ married\ men=So viele verheiratete M\u00e4nner
17
18#: married-men:5
19with\ wives\ who\ never\ understand=und ihre Frauen verstehen sie nicht
20
21#: married-men:6
22!They're\ looking\ for\ someone\ to\ share=
23
24# schwer zu \u00fcbersetzen...
25#: married-men:7
26!the\ excitement\ of\ a\ love\ affair=
27
28#: married-men:8
29!Just\ as\ soon\ as\ they\ find\ you=
30
31#: married-men:9
32!They\ warn\ you\ and\ darn\ you=
33EOF
34
35tmpfiles="$tmpfiles ma-s-1.tmp ma-s-1.out"
36: ${MSGATTRIB=msgattrib}
37${MSGATTRIB} --translated --properties-input --properties-output -o ma-s-1.tmp ma-s-1.properties
38test $? = 0 || { rm -fr $tmpfiles; exit 1; }
39tr -d '\r' < ma-s-1.tmp > ma-s-1.out
40test $? = 0 || { rm -fr $tmpfiles; exit 1; }
41
42tmpfiles="$tmpfiles ma-s-1.ok"
43cat <<\EOF > ma-s-1.ok
44# HEADER.
45#
46!=Project-Id-Version\: Bonnie Tyler\n
47
48#: married-men:4
49#, fuzzy
50!The\ world\ is\ full\ of\ married\ men=So viele verheiratete M\u00e4nner
51
52#: married-men:5
53with\ wives\ who\ never\ understand=und ihre Frauen verstehen sie nicht
54EOF
55
56: ${DIFF=diff}
57${DIFF} ma-s-1.ok ma-s-1.out
58result=$?
59
60rm -fr $tmpfiles
61
62exit $result
63