• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#! /bin/sh
2. "${srcdir=.}/init.sh"; path_prepend_ . ../src
3
4# Test 'quot' and 'boldquot' filter.
5
6cat <<\EOF > mfi.po
7msgid ""
8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"
10"PO-Revision-Date: 2014-04-10 16:40+0900\n"
11"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
12"Language-Team: LANGUAGE <LL@li.org>\n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=US-ASCII\n"
15"Content-Transfer-Encoding: 8bit\n"
16
17msgid "\"double quoted\""
18msgstr "\"double quoted\""
19
20msgid "\"\"double quoted\""
21msgstr "\"\"double quoted\""
22
23msgid "\"foo\" \"bar\" \"baz\""
24msgstr "\"foo\" \"bar\" \"baz\""
25
26msgid "double quoted but empty \"\""
27msgstr "double quoted but empty \"\""
28
29msgid "'single quoted'"
30msgstr "'single quoted'"
31
32msgid "'foo' 'bar' 'baz'"
33msgstr "'foo' 'bar' 'baz'"
34
35msgid "prefix'single quoted without surrounding spaces'suffix"
36msgstr "prefix'single quoted without surrounding spaces'suffix"
37
38msgid "prefix 'single quoted with surrounding spaces' suffix"
39msgstr "prefix 'single quoted with surrounding spaces' suffix"
40
41msgid "single quoted with apostrophe, empty '' "
42msgstr "single quoted with apostrophe, empty '' "
43
44msgid "'single quoted at the beginning of string' "
45msgstr "'single quoted at the beginning of string' "
46
47msgid " 'single quoted at the end of string'"
48msgstr " 'single quoted at the end of string'"
49
50msgid ""
51"line 1\n"
52"'single quoted at the beginning of line' \n"
53"line 3"
54msgstr ""
55"line 1\n"
56"'single quoted at the beginning of line' \n"
57"line 3"
58
59msgid ""
60"line 1\n"
61" 'single quoted at the end of line'\n"
62"line 3"
63msgstr ""
64"line 1\n"
65" 'single quoted at the end of line'\n"
66"line 3"
67
68msgid "`single quoted with grave'"
69msgstr "`single quoted with grave'"
70
71msgid "single quoted with grave, empty `'"
72msgstr "single quoted with grave, empty `'"
73
74msgid "``double grave'"
75msgstr "``double grave'"
76EOF
77
78: ${MSGFILTER=msgfilter}
79LC_ALL=C ${MSGFILTER} -i mfi.po -o mfi-quot.out quot 2>&1 2>/dev/null || Exit 1
80
81cat <<\EOF > mfi-quot.ok
82msgid ""
83msgstr ""
84"Project-Id-Version: PACKAGE VERSION\n"
85"PO-Revision-Date: 2014-04-10 16:40+0900\n"
86"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
87"Language-Team: LANGUAGE <LL@li.org>\n"
88"MIME-Version: 1.0\n"
89"Content-Type: text/plain; charset=UTF-8\n"
90"Content-Transfer-Encoding: 8bit\n"
91
92msgid "\"double quoted\""
93msgstr "“double quoted”"
94
95msgid "\"\"double quoted\""
96msgstr "\"\"double quoted\""
97
98msgid "\"foo\" \"bar\" \"baz\""
99msgstr "“foo” “bar” “baz”"
100
101msgid "double quoted but empty \"\""
102msgstr "double quoted but empty \"\""
103
104msgid "'single quoted'"
105msgstr "'single quoted'"
106
107msgid "'foo' 'bar' 'baz'"
108msgstr "‘foo’ ‘bar’ ‘baz’"
109
110msgid "prefix'single quoted without surrounding spaces'suffix"
111msgstr "prefix'single quoted without surrounding spaces'suffix"
112
113msgid "prefix 'single quoted with surrounding spaces' suffix"
114msgstr "prefix ‘single quoted with surrounding spaces’ suffix"
115
116msgid "single quoted with apostrophe, empty '' "
117msgstr "single quoted with apostrophe, empty ‘’ "
118
119msgid "'single quoted at the beginning of string' "
120msgstr "‘single quoted at the beginning of string’ "
121
122msgid " 'single quoted at the end of string'"
123msgstr " ‘single quoted at the end of string’"
124
125msgid ""
126"line 1\n"
127"'single quoted at the beginning of line' \n"
128"line 3"
129msgstr ""
130"line 1\n"
131"‘single quoted at the beginning of line’ \n"
132"line 3"
133
134msgid ""
135"line 1\n"
136" 'single quoted at the end of line'\n"
137"line 3"
138msgstr ""
139"line 1\n"
140" ‘single quoted at the end of line’\n"
141"line 3"
142
143msgid "`single quoted with grave'"
144msgstr "single quoted with grave"
145
146msgid "single quoted with grave, empty `'"
147msgstr "single quoted with grave, empty ‘’"
148
149msgid "``double grave'"
150msgstr "`‘double grave"
151EOF
152
153: ${DIFF=diff}
154${DIFF} mfi-quot.ok mfi-quot.out || Exit 1
155
156LC_ALL=C ${MSGFILTER} -i mfi.po -o mfi-boldquot.out boldquot 2>&1 2>/dev/null || Exit 1
157
158cat <<\EOF > mfi-boldquot.ok
159msgid ""
160msgstr ""
161"Project-Id-Version: PACKAGE VERSION\n"
162"PO-Revision-Date: 2014-04-10 16:40+0900\n"
163"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
164"Language-Team: LANGUAGE <LL@li.org>\n"
165"MIME-Version: 1.0\n"
166"Content-Type: text/plain; charset=UTF-8\n"
167"Content-Transfer-Encoding: 8bit\n"
168
169msgid "\"double quoted\""
170msgstr "“double quoted"
171
172msgid "\"\"double quoted\""
173msgstr "\"\"double quoted\""
174
175msgid "\"foo\" \"bar\" \"baz\""
176msgstr "“foo” “bar” “baz"
177
178msgid "double quoted but empty \"\""
179msgstr "double quoted but empty \"\""
180
181msgid "'single quoted'"
182msgstr "'single quoted'"
183
184msgid "'foo' 'bar' 'baz'"
185msgstr "‘foo’ ‘bar’ ‘baz"
186
187msgid "prefix'single quoted without surrounding spaces'suffix"
188msgstr "prefix'single quoted without surrounding spaces'suffix"
189
190msgid "prefix 'single quoted with surrounding spaces' suffix"
191msgstr "prefix ‘single quoted with surrounding spacessuffix"
192
193msgid "single quoted with apostrophe, empty '' "
194msgstr "single quoted with apostrophe, empty ‘"
195
196msgid "'single quoted at the beginning of string' "
197msgstr "‘single quoted at the beginning of string"
198
199msgid " 'single quoted at the end of string'"
200msgstr " ‘single quoted at the end of string"
201
202msgid ""
203"line 1\n"
204"'single quoted at the beginning of line' \n"
205"line 3"
206msgstr ""
207"line 1\n"
208"‘single quoted at the beginning of line’ \n"
209"line 3"
210
211msgid ""
212"line 1\n"
213" 'single quoted at the end of line'\n"
214"line 3"
215msgstr ""
216"line 1\n"
217" ‘single quoted at the end of line’\n"
218"line 3"
219
220msgid "`single quoted with grave'"
221msgstr "‘single quoted with grave’"
222
223msgid "single quoted with grave, empty `'"
224msgstr "single quoted with grave, empty ‘’"
225
226msgid "``double grave'"
227msgstr "`‘double grave’"
228EOF
229
230${DIFF} mfi-boldquot.ok mfi-boldquot.out || Exit 1
231