• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test empty msgstr handling.
5# <https://savannah.gnu.org/bugs/?43720>
6
7cat <<\EOF > mfi-test7.po
8# HEADER.
9#
10msgid ""
11msgstr ""
12"Project-Id-Version: Bonnie Tyler\n"
13"Content-Type: text/plain; charset=ISO-8859-1\n"
14"Content-Transfer-Encoding: 8bit\n"
15
16#: married-men:4
17#, fuzzy
18msgid "The world is full of married men"
19msgstr "So viele verheiratete M�nner"
20
21#: married-men:5
22msgid "with wives who never understand"
23msgstr "und ihre Frauen verstehen sie nicht"
24
25#: married-men:6
26msgid "They're looking for someone to share"
27msgstr ""
28
29# schwer zu �bersetzen...
30#: married-men:7
31msgid "the excitement of a love affair"
32msgstr ""
33
34#: married-men:8
35msgid "Just as soon as they find you"
36msgstr ""
37
38#: married-men:9
39msgid "They warn you and darn you"
40msgstr ""
41
42#~ msgid "You fly on the wings of romance"
43#~ msgstr "Die Fl�gel der frischen Liebe heben dich zum Himmel"
44
45#, fuzzy
46#~ msgid "In the eyes of the world"
47#~ msgstr "F�r die anderen"
48
49# Etwas freie �bersetzung.
50#~ msgid "You're just another crazy girl"
51#~ msgstr "bist du blo� ein verr�cktes dummes Ding"
52
53#~ msgid "Who loves a married man"
54#~ msgstr "das einen verheirateten Mann liebt"
55EOF
56
57cat <<\EOF > mf-test7.sh
58#! /bin/sh
59
60# Eat up filter input to avoid EPIPE in the parent process.
61cat > /dev/null
62
63echo testing
64EOF
65chmod +x mf-test7.sh
66
67: ${MSGFILTER=msgfilter}
68LC_ALL=C ${MSGFILTER} -i mfi-test7.po -o mfi-test7.out \
69      ./mf-test7.sh >mfi-test7.err 2>&1
70result=$?
71cat mfi-test7.err | grep -v 'warning: Locale charset' | grep -v '^ '
72test $result = 0 || { Exit 1; }
73
74cat <<\EOF > mfi-test7.ok
75# HEADER.
76#
77msgid ""
78msgstr "testing\n"
79
80#: married-men:4
81#, fuzzy
82msgid "The world is full of married men"
83msgstr "testing\n"
84
85#: married-men:5
86msgid "with wives who never understand"
87msgstr "testing\n"
88
89#: married-men:6
90msgid "They're looking for someone to share"
91msgstr "testing\n"
92
93# schwer zu �bersetzen...
94#: married-men:7
95msgid "the excitement of a love affair"
96msgstr "testing\n"
97
98#: married-men:8
99msgid "Just as soon as they find you"
100msgstr "testing\n"
101
102#: married-men:9
103msgid "They warn you and darn you"
104msgstr "testing\n"
105
106#~ msgid "You fly on the wings of romance"
107#~ msgstr "testing\n"
108
109#, fuzzy
110#~ msgid "In the eyes of the world"
111#~ msgstr "testing\n"
112
113# Etwas freie �bersetzung.
114#~ msgid "You're just another crazy girl"
115#~ msgstr "testing\n"
116
117#~ msgid "Who loves a married man"
118#~ msgstr "testing\n"
119EOF
120
121: ${DIFF=diff}
122${DIFF} mfi-test7.ok mfi-test7.out
123result=$?
124
125exit $result
126