Imported Upstream version 0.19.7
[platform/upstream/gettext.git] / gettext-tools / tests / msgfilter-7
1 #! /bin/sh
2 . "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4 # Test empty msgstr handling.
5 # <https://savannah.gnu.org/bugs/?43720>
6
7 cat <<\EOF > mfi-test7.po
8 # HEADER.
9 #
10 msgid ""
11 msgstr ""
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
18 msgid "The world is full of married men"
19 msgstr "So viele verheiratete Männer"
20
21 #: married-men:5
22 msgid "with wives who never understand"
23 msgstr "und ihre Frauen verstehen sie nicht"
24
25 #: married-men:6
26 msgid "They're looking for someone to share"
27 msgstr ""
28
29 # schwer zu übersetzen...
30 #: married-men:7
31 msgid "the excitement of a love affair"
32 msgstr ""
33
34 #: married-men:8
35 msgid "Just as soon as they find you"
36 msgstr ""
37
38 #: married-men:9
39 msgid "They warn you and darn you"
40 msgstr ""
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"
55 EOF
56
57 cat <<\EOF > mf-test7.sh
58 #! /bin/sh
59
60 # Eat up filter input to avoid EPIPE in the parent process.
61 cat > /dev/null
62
63 echo testing
64 EOF
65 chmod +x mf-test7.sh
66
67 : ${MSGFILTER=msgfilter}
68 LC_ALL=C ${MSGFILTER} -i mfi-test7.po -o mfi-test7.out \
69       ./mf-test7.sh >mfi-test7.err 2>&1
70 result=$?
71 cat mfi-test7.err | grep -v 'warning: Locale charset' | grep -v '^ '
72 test $result = 0 || { exit 1; }
73
74 cat <<\EOF > mfi-test7.ok
75 # HEADER.
76 #
77 msgid ""
78 msgstr "testing\n"
79
80 #: married-men:4
81 #, fuzzy
82 msgid "The world is full of married men"
83 msgstr "testing\n"
84
85 #: married-men:5
86 msgid "with wives who never understand"
87 msgstr "testing\n"
88
89 #: married-men:6
90 msgid "They're looking for someone to share"
91 msgstr "testing\n"
92
93 # schwer zu übersetzen...
94 #: married-men:7
95 msgid "the excitement of a love affair"
96 msgstr "testing\n"
97
98 #: married-men:8
99 msgid "Just as soon as they find you"
100 msgstr "testing\n"
101
102 #: married-men:9
103 msgid "They warn you and darn you"
104 msgstr "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"
119 EOF
120
121 : ${DIFF=diff}
122 ${DIFF} mfi-test7.ok mfi-test7.out
123 result=$?
124
125 exit $result