/[pcre]/code/trunk/testdata/testinput15
ViewVC logotype

Contents of /code/trunk/testdata/testinput15

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1174 - (show annotations)
Wed Oct 24 21:29:12 2012 UTC (7 years, 7 months ago) by chpe
File size: 5623 byte(s)
tests: Improve test coverage for pcre_valid_utf8.c

Make sure to have a test for every PCRE_UTF8_ERRn.
1 /-- This set of tests is for UTF-8 support, and is relevant only to the 8-bit
2 library. --/
3
4 /X(\C{3})/8
5 X\x{1234}
6
7 /X(\C{4})/8
8 X\x{1234}YZ
9
10 /X\C*/8
11 XYZabcdce
12
13 /X\C*?/8
14 XYZabcde
15
16 /X\C{3,5}/8
17 Xabcdefg
18 X\x{1234}
19 X\x{1234}YZ
20 X\x{1234}\x{512}
21 X\x{1234}\x{512}YZ
22
23 /X\C{3,5}?/8
24 Xabcdefg
25 X\x{1234}
26 X\x{1234}YZ
27 X\x{1234}\x{512}
28
29 /a\Cb/8
30 aXb
31 a\nb
32
33 /a\C\Cb/8
34 a\x{100}b
35
36 /ab\Cde/8
37 abXde
38
39 /a\C\Cb/8
40 a\x{100}b
41 ** Failers
42 a\x{12257}b
43
44 /[]/8
45
46 //8
47
48 /xxx/8
49
50 /xxx/8?DZSS
51
52 /abc/8
53 \xdf
54 \xef
55 \xef\x80
56 \xf7
57 \xf7\x80
58 \xf7\x80\x80
59 \xfb
60 \xfb\x80
61 \xfb\x80\x80
62 \xfb\x80\x80\x80
63 \xfd
64 \xfd\x80
65 \xfd\x80\x80
66 \xfd\x80\x80\x80
67 \xfd\x80\x80\x80\x80
68 \xdf\x7f
69 \xef\x7f\x80
70 \xef\x80\x7f
71 \xf7\x7f\x80\x80
72 \xf7\x80\x7f\x80
73 \xf7\x80\x80\x7f
74 \xfb\x7f\x80\x80\x80
75 \xfb\x80\x7f\x80\x80
76 \xfb\x80\x80\x7f\x80
77 \xfb\x80\x80\x80\x7f
78 \xfd\x7f\x80\x80\x80\x80
79 \xfd\x80\x7f\x80\x80\x80
80 \xfd\x80\x80\x7f\x80\x80
81 \xfd\x80\x80\x80\x7f\x80
82 \xfd\x80\x80\x80\x80\x7f
83 \xed\xa0\x80
84 \xc0\x8f
85 \xe0\x80\x8f
86 \xf0\x80\x80\x8f
87 \xf8\x80\x80\x80\x8f
88 \xfc\x80\x80\x80\x80\x8f
89 \x80
90 \xfe
91 \xff
92 \xef\xb7\x90
93
94 /abc/8
95 \xfb\x80\x80\x80\x80
96 \xfd\x80\x80\x80\x80\x80
97 \xf7\xbf\xbf\xbf
98
99 /anything/8
100 \xc0\x80
101 \xc1\x8f
102 \xe0\x9f\x80
103 \xf0\x8f\x80\x80
104 \xf8\x87\x80\x80\x80
105 \xfc\x83\x80\x80\x80\x80
106 \xfe\x80\x80\x80\x80\x80
107 \xff\x80\x80\x80\x80\x80
108 \xc3\x8f
109 \xe0\xaf\x80
110 \xe1\x80\x80
111 \xf0\x9f\x80\x80
112 \xf1\x8f\x80\x80
113 \xf8\x88\x80\x80\x80
114 \xf9\x87\x80\x80\x80
115 \xfc\x84\x80\x80\x80\x80
116 \xfd\x83\x80\x80\x80\x80
117 \?\xf8\x88\x80\x80\x80
118 \?\xf9\x87\x80\x80\x80
119 \?\xfc\x84\x80\x80\x80\x80
120 \?\xfd\x83\x80\x80\x80\x80
121
122 /noncharacter/8
123 \x{fffe}
124 \x{ffff}
125 \x{1fffe}
126 \x{1ffff}
127 \x{2fffe}
128 \x{2ffff}
129 \x{3fffe}
130 \x{3ffff}
131 \x{4fffe}
132 \x{4ffff}
133 \x{5fffe}
134 \x{5ffff}
135 \x{6fffe}
136 \x{6ffff}
137 \x{7fffe}
138 \x{7ffff}
139 \x{8fffe}
140 \x{8ffff}
141 \x{9fffe}
142 \x{9ffff}
143 \x{afffe}
144 \x{affff}
145 \x{bfffe}
146 \x{bffff}
147 \x{cfffe}
148 \x{cffff}
149 \x{dfffe}
150 \x{dffff}
151 \x{efffe}
152 \x{effff}
153 \x{ffffe}
154 \x{fffff}
155 \x{10fffe}
156 \x{10ffff}
157 \x{fdd0}
158 \x{fdd1}
159 \x{fdd2}
160 \x{fdd3}
161 \x{fdd4}
162 \x{fdd5}
163 \x{fdd6}
164 \x{fdd7}
165 \x{fdd8}
166 \x{fdd9}
167 \x{fdda}
168 \x{fddb}
169 \x{fddc}
170 \x{fddd}
171 \x{fdde}
172 \x{fddf}
173 \x{fde0}
174 \x{fde1}
175 \x{fde2}
176 \x{fde3}
177 \x{fde4}
178 \x{fde5}
179 \x{fde6}
180 \x{fde7}
181 \x{fde8}
182 \x{fde9}
183 \x{fdea}
184 \x{fdeb}
185 \x{fdec}
186 \x{fded}
187 \x{fdee}
188 \x{fdef}
189
190 /\x{100}/8DZ
191
192 /\x{1000}/8DZ
193
194 /\x{10000}/8DZ
195
196 /\x{100000}/8DZ
197
198 /\x{10ffff}/8DZ
199
200 /[\x{ff}]/8DZ
201
202 /[\x{100}]/8DZ
203
204 /\x80/8DZ
205
206 /\xff/8DZ
207
208 /\x{D55c}\x{ad6d}\x{C5B4}/DZ8
209 \x{D55c}\x{ad6d}\x{C5B4}
210
211 /\x{65e5}\x{672c}\x{8a9e}/DZ8
212 \x{65e5}\x{672c}\x{8a9e}
213
214 /\x{80}/DZ8
215
216 /\x{084}/DZ8
217
218 /\x{104}/DZ8
219
220 /\x{861}/DZ8
221
222 /\x{212ab}/DZ8
223
224 /-- This one is here not because it's different to Perl, but because the way
225 the captured single-byte is displayed. (In Perl it becomes a character, and you
226 can't tell the difference.) --/
227
228 /X(\C)(.*)/8
229 X\x{1234}
230 X\nabc
231
232 /-- This one is here because Perl gives out a grumbly error message (quite
233 correctly, but that messes up comparisons). --/
234
235 /a\Cb/8
236 *** Failers
237 a\x{100}b
238
239 /[^ab\xC0-\xF0]/8SDZ
240 \x{f1}
241 \x{bf}
242 \x{100}
243 \x{1000}
244 *** Failers
245 \x{c0}
246 \x{f0}
247
248 /Ā{3,4}/8SDZ
249 \x{100}\x{100}\x{100}\x{100\x{100}
250
251 /(\x{100}+|x)/8SDZ
252
253 /(\x{100}*a|x)/8SDZ
254
255 /(\x{100}{0,2}a|x)/8SDZ
256
257 /(\x{100}{1,2}a|x)/8SDZ
258
259 /\x{100}/8DZ
260
261 /a\x{100}\x{101}*/8DZ
262
263 /a\x{100}\x{101}+/8DZ
264
265 /[^\x{c4}]/DZ
266
267 /[\x{100}]/8DZ
268 \x{100}
269 Z\x{100}
270 \x{100}Z
271 *** Failers
272
273 /[\xff]/DZ8
274 >\x{ff}<
275
276 /[^\xff]/8DZ
277
278 /\x{100}abc(xyz(?1))/8DZ
279
280 /a\x{1234}b/P8
281 a\x{1234}b
282
283 /\777/8I
284 \x{1ff}
285 \777
286
287 /\x{100}+\x{200}/8DZ
288
289 /\x{100}+X/8DZ
290
291 /^[\QĀ\E-\QŐ\E/BZ8
292
293 /-- This tests the stricter UTF-8 check according to RFC 3629. --/
294
295 /X/8
296 \x{0}\x{d7ff}\x{e000}\x{10ffff}
297 \x{d800}
298 \x{d800}\?
299 \x{da00}
300 \x{da00}\?
301 \x{dfff}
302 \x{dfff}\?
303 \x{110000}
304 \x{110000}\?
305 \x{2000000}
306 \x{2000000}\?
307 \x{7fffffff}
308 \x{7fffffff}\?
309
310 /(*UTF8)\x{1234}/
311 abcd\x{1234}pqr
312
313 /(*CRLF)(*UTF8)(*BSR_UNICODE)a\Rb/I
314
315 /\h/SI8
316 ABC\x{09}
317 ABC\x{20}
318 ABC\x{a0}
319 ABC\x{1680}
320 ABC\x{180e}
321 ABC\x{2000}
322 ABC\x{202f}
323 ABC\x{205f}
324 ABC\x{3000}
325
326 /\v/SI8
327 ABC\x{0a}
328 ABC\x{0b}
329 ABC\x{0c}
330 ABC\x{0d}
331 ABC\x{85}
332 ABC\x{2028}
333
334 /\h*A/SI8
335 CDBABC
336
337 /\v+A/SI8
338
339 /\s?xxx\s/8SI
340
341 /\sxxx\s/I8ST1
342 AB\x{85}xxx\x{a0}XYZ
343 AB\x{a0}xxx\x{85}XYZ
344
345 /\S \S/I8ST1
346 \x{a2} \x{84}
347 A Z
348
349 /a+/8
350 a\x{123}aa\>1
351 a\x{123}aa\>2
352 a\x{123}aa\>3
353 a\x{123}aa\>4
354 a\x{123}aa\>5
355 a\x{123}aa\>6
356
357 /\x{1234}+/iS8I
358
359 /\x{1234}+?/iS8I
360
361 /\x{1234}++/iS8I
362
363 /\x{1234}{2}/iS8I
364
365 /[^\x{c4}]/8DZ
366
367 /X+\x{200}/8DZ
368
369 /\R/SI8
370
371 /\777/8DZ
372
373 /\w+\x{C4}/8BZ
374 a\x{C4}\x{C4}
375
376 /\w+\x{C4}/8BZT1
377 a\x{C4}\x{C4}
378
379 /\W+\x{C4}/8BZ
380 !\x{C4}
381
382 /\W+\x{C4}/8BZT1
383 !\x{C4}
384
385 /\W+\x{A1}/8BZ
386 !\x{A1}
387
388 /\W+\x{A1}/8BZT1
389 !\x{A1}
390
391 /X\s+\x{A0}/8BZ
392 X\x20\x{A0}\x{A0}
393
394 /X\s+\x{A0}/8BZT1
395 X\x20\x{A0}\x{A0}
396
397 /\S+\x{A0}/8BZ
398 X\x{A0}\x{A0}
399
400 /\S+\x{A0}/8BZT1
401 X\x{A0}\x{A0}
402
403 /\x{a0}+\s!/8BZ
404 \x{a0}\x20!
405
406 /\x{a0}+\s!/8BZT1
407 \x{a0}\x20!
408
409 /-- End of testinput15 --/

  ViewVC Help
Powered by ViewVC 1.1.5