/[pcre]/code/branches/pcre16/testdata/testinput7
ViewVC logotype

Contents of /code/branches/pcre16/testdata/testinput7

Parent Directory Parent Directory | Revision Log Revision Log


Revision 814 - (show annotations)
Wed Dec 21 12:05:24 2011 UTC (8 years, 6 months ago) by ph10
File size: 8264 byte(s)
Reorganized the tests and made many more work in 16-bit mode.
1 /-- These tests for Unicode property support test PCRE's API and show some of
2 the compiled code. They are not Perl-compatible. --/
3
4 /[\p{L}]/DZ
5
6 /[\p{^L}]/DZ
7
8 /[\P{L}]/DZ
9
10 /[\P{^L}]/DZ
11
12 /[abc\p{L}\x{0660}]/8DZ
13
14 /[\p{Nd}]/8DZ
15 1234
16
17 /[\p{Nd}+-]+/8DZ
18 1234
19 12-34
20 12+\x{661}-34
21 ** Failers
22 abcd
23
24 /[\x{105}-\x{109}]/8iDZ
25 \x{104}
26 \x{105}
27 \x{109}
28 ** Failers
29 \x{100}
30 \x{10a}
31
32 /[z-\x{100}]/8iDZ
33 Z
34 z
35 \x{39c}
36 \x{178}
37 |
38 \x{80}
39 \x{ff}
40 \x{100}
41 \x{101}
42 ** Failers
43 \x{102}
44 Y
45 y
46
47 /[z-\x{100}]/8DZi
48
49 /(?:[\PPa*]*){8,}/
50
51 /[\P{Any}]/BZ
52
53 /[\P{Any}\E]/BZ
54
55 /(\P{Yi}+\277)/
56
57 /(\P{Yi}+\277)?/
58
59 /(?<=\P{Yi}{3}A)X/
60
61 /\p{Yi}+(\P{Yi}+)(?1)/
62
63 /(\P{Yi}{2}\277)?/
64
65 /[\P{Yi}A]/
66
67 /[\P{Yi}\P{Yi}\P{Yi}A]/
68
69 /[^\P{Yi}A]/
70
71 /[^\P{Yi}\P{Yi}\P{Yi}A]/
72
73 /(\P{Yi}*\277)*/
74
75 /(\P{Yi}*?\277)*/
76
77 /(\p{Yi}*+\277)*/
78
79 /(\P{Yi}?\277)*/
80
81 /(\P{Yi}??\277)*/
82
83 /(\p{Yi}?+\277)*/
84
85 /(\P{Yi}{0,3}\277)*/
86
87 /(\P{Yi}{0,3}?\277)*/
88
89 /(\p{Yi}{0,3}+\277)*/
90
91 /\p{Zl}{2,3}+/8BZ
92 \xe2\x80\xa8\xe2\x80\xa8
93 \x{2028}\x{2028}\x{2028}
94
95 /\p{Zl}/8BZ
96
97 /\p{Lu}{3}+/8BZ
98
99 /\pL{2}+/8BZ
100
101 /\p{Cc}{2}+/8BZ
102
103 /^\p{Cs}/8
104 \?\x{dfff}
105 ** Failers
106 \x{09f}
107
108 /^\p{Sc}+/8
109 $\x{a2}\x{a3}\x{a4}\x{a5}\x{a6}
110 \x{9f2}
111 ** Failers
112 X
113 \x{2c2}
114
115 /^\p{Zs}/8
116 \ \
117 \x{a0}
118 \x{1680}
119 \x{180e}
120 \x{2000}
121 \x{2001}
122 ** Failers
123 \x{2028}
124 \x{200d}
125
126 /-- These four are here rather than in test 6 because Perl has problems with
127 the negative versions of the properties. --/
128
129 /\p{^Lu}/8i
130 1234
131 ** Failers
132 ABC
133
134 /\P{Lu}/8i
135 1234
136 ** Failers
137 ABC
138
139 /\p{Ll}/8i
140 a
141 Az
142 ** Failers
143 ABC
144
145 /\p{Lu}/8i
146 A
147 a\x{10a0}B
148 ** Failers
149 a
150 \x{1d00}
151
152 /[\x{c0}\x{391}]/8i
153 \x{c0}
154 \x{e0}
155
156 /-- The next two are special cases where the lengths of the different cases of
157 the same character differ. The first went wrong with heap frame storage; the
158 second was broken in all cases. --/
159
160 /^\x{023a}+?(\x{0130}+)/8i
161 \x{023a}\x{2c65}\x{0130}
162
163 /^\x{023a}+([^X])/8i
164 \x{023a}\x{2c65}X
165
166 /\x{c0}+\x{116}+/8i
167 \x{c0}\x{e0}\x{116}\x{117}
168
169 /[\x{c0}\x{116}]+/8i
170 \x{c0}\x{e0}\x{116}\x{117}
171
172 /(\x{de})\1/8i
173 \x{de}\x{de}
174 \x{de}\x{fe}
175 \x{fe}\x{fe}
176 \x{fe}\x{de}
177
178 /^\x{c0}$/8i
179 \x{c0}
180 \x{e0}
181
182 /^\x{e0}$/8i
183 \x{c0}
184 \x{e0}
185
186 /-- The next two should be Perl-compatible, but it fails to match \x{e0}. PCRE
187 will match it only with UCP support, because without that it has no notion
188 of case for anything other than the ASCII letters. --/
189
190 /((?i)[\x{c0}])/8
191 \x{c0}
192 \x{e0}
193
194 /(?i:[\x{c0}])/8
195 \x{c0}
196 \x{e0}
197
198 /-- This should be Perl-compatible but Perl 5.11 gets \x{300} wrong. --/8
199
200 /^\X/8
201 A
202 A\x{300}BC
203 A\x{300}\x{301}\x{302}BC
204 *** Failers
205 \x{300}
206
207 /-- These are PCRE's extra properties to help with Unicodizing \d etc. --/
208
209 /^\p{Xan}/8
210 ABCD
211 1234
212 \x{6ca}
213 \x{a6c}
214 \x{10a7}
215 ** Failers
216 _ABC
217
218 /^\p{Xan}+/8
219 ABCD1234\x{6ca}\x{a6c}\x{10a7}_
220 ** Failers
221 _ABC
222
223 /^\p{Xan}+?/8
224 \x{6ca}\x{a6c}\x{10a7}_
225
226 /^\p{Xan}*/8
227 ABCD1234\x{6ca}\x{a6c}\x{10a7}_
228
229 /^\p{Xan}{2,9}/8
230 ABCD1234\x{6ca}\x{a6c}\x{10a7}_
231
232 /^\p{Xan}{2,9}?/8
233 \x{6ca}\x{a6c}\x{10a7}_
234
235 /^[\p{Xan}]/8
236 ABCD1234_
237 1234abcd_
238 \x{6ca}
239 \x{a6c}
240 \x{10a7}
241 ** Failers
242 _ABC
243
244 /^[\p{Xan}]+/8
245 ABCD1234\x{6ca}\x{a6c}\x{10a7}_
246 ** Failers
247 _ABC
248
249 /^>\p{Xsp}/8
250 >\x{1680}\x{2028}\x{0b}
251 >\x{a0}
252 ** Failers
253 \x{0b}
254
255 /^>\p{Xsp}+/8
256 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
257
258 /^>\p{Xsp}+?/8
259 >\x{1680}\x{2028}\x{0b}
260
261 /^>\p{Xsp}*/8
262 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
263
264 /^>\p{Xsp}{2,9}/8
265 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
266
267 /^>\p{Xsp}{2,9}?/8
268 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
269
270 /^>[\p{Xsp}]/8
271 >\x{2028}\x{0b}
272
273 /^>[\p{Xsp}]+/8
274 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
275
276 /^>\p{Xps}/8
277 >\x{1680}\x{2028}\x{0b}
278 >\x{a0}
279 ** Failers
280 \x{0b}
281
282 /^>\p{Xps}+/8
283 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
284
285 /^>\p{Xps}+?/8
286 >\x{1680}\x{2028}\x{0b}
287
288 /^>\p{Xps}*/8
289 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
290
291 /^>\p{Xps}{2,9}/8
292 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
293
294 /^>\p{Xps}{2,9}?/8
295 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
296
297 /^>[\p{Xps}]/8
298 >\x{2028}\x{0b}
299
300 /^>[\p{Xps}]+/8
301 > \x{09}\x{0a}\x{0c}\x{0d}\x{a0}\x{1680}\x{2028}\x{0b}
302
303 /^\p{Xwd}/8
304 ABCD
305 1234
306 \x{6ca}
307 \x{a6c}
308 \x{10a7}
309 _ABC
310 ** Failers
311 []
312
313 /^\p{Xwd}+/8
314 ABCD1234\x{6ca}\x{a6c}\x{10a7}_
315
316 /^\p{Xwd}+?/8
317 \x{6ca}\x{a6c}\x{10a7}_
318
319 /^\p{Xwd}*/8
320 ABCD1234\x{6ca}\x{a6c}\x{10a7}_
321
322 /^\p{Xwd}{2,9}/8
323 A_B12\x{6ca}\x{a6c}\x{10a7}
324
325 /^\p{Xwd}{2,9}?/8
326 \x{6ca}\x{a6c}\x{10a7}_
327
328 /^[\p{Xwd}]/8
329 ABCD1234_
330 1234abcd_
331 \x{6ca}
332 \x{a6c}
333 \x{10a7}
334 _ABC
335 ** Failers
336 []
337
338 /^[\p{Xwd}]+/8
339 ABCD1234\x{6ca}\x{a6c}\x{10a7}_
340
341 /-- A check not in UTF-8 mode --/
342
343 /^[\p{Xwd}]+/
344 ABCD1234_
345
346 /-- Some negative checks --/
347
348 /^[\P{Xwd}]+/8
349 !.+\x{019}\x{35a}AB
350
351 /^[\p{^Xwd}]+/8
352 !.+\x{019}\x{35a}AB
353
354 /[\D]/WBZ8
355 1\x{3c8}2
356
357 /[\d]/WBZ8
358 >\x{6f4}<
359
360 /[\S]/WBZ8
361 \x{1680}\x{6f4}\x{1680}
362
363 /[\s]/WBZ8
364 >\x{1680}<
365
366 /[\W]/WBZ8
367 A\x{1712}B
368
369 /[\w]/WBZ8
370 >\x{1723}<
371
372 /\D/WBZ8
373 1\x{3c8}2
374
375 /\d/WBZ8
376 >\x{6f4}<
377
378 /\S/WBZ8
379 \x{1680}\x{6f4}\x{1680}
380
381 /\s/WBZ8
382 >\x{1680}>
383
384 /\W/WBZ8
385 A\x{1712}B
386
387 /\w/WBZ8
388 >\x{1723}<
389
390 /[[:alpha:]]/WBZ
391
392 /[[:lower:]]/WBZ
393
394 /[[:upper:]]/WBZ
395
396 /[[:alnum:]]/WBZ
397
398 /[[:ascii:]]/WBZ
399
400 /[[:blank:]]/WBZ
401
402 /[[:cntrl:]]/WBZ
403
404 /[[:digit:]]/WBZ
405
406 /[[:graph:]]/WBZ
407
408 /[[:print:]]/WBZ
409
410 /[[:punct:]]/WBZ
411
412 /[[:space:]]/WBZ
413
414 /[[:word:]]/WBZ
415
416 /[[:xdigit:]]/WBZ
417
418 /-- Unicode properties for \b abd \B --/
419
420 /\b...\B/8W
421 abc_
422 \x{37e}abc\x{376}
423 \x{37e}\x{376}\x{371}\x{393}\x{394}
424 !\x{c0}++\x{c1}\x{c2}
425 !\x{c0}+++++
426
427 /-- Without PCRE_UCP, non-ASCII always fail, even if < 256 --/
428
429 /\b...\B/8
430 abc_
431 ** Failers
432 \x{37e}abc\x{376}
433 \x{37e}\x{376}\x{371}\x{393}\x{394}
434 !\x{c0}++\x{c1}\x{c2}
435 !\x{c0}+++++
436
437 /-- With PCRE_UCP, non-UTF8 chars that are < 256 still check properties --/
438
439 /\b...\B/W
440 abc_
441 !\x{c0}++\x{c1}\x{c2}
442 !\x{c0}+++++
443
444 /-- Some of these are silly, but they check various combinations --/
445
446 /[[:^alpha:][:^cntrl:]]+/8WBZ
447 123
448 abc
449
450 /[[:^cntrl:][:^alpha:]]+/8WBZ
451 123
452 abc
453
454 /[[:alpha:]]+/8WBZ
455 abc
456
457 /[[:^alpha:]\S]+/8WBZ
458 123
459 abc
460
461 /[^\d]+/8WBZ
462 abc123
463 abc\x{123}
464 \x{660}abc
465
466 /\p{Lu}+9\p{Lu}+B\p{Lu}+b/BZ
467
468 /\p{^Lu}+9\p{^Lu}+B\p{^Lu}+b/BZ
469
470 /\P{Lu}+9\P{Lu}+B\P{Lu}+b/BZ
471
472 /\p{Han}+X\p{Greek}+\x{370}/BZ8
473
474 /\p{Xan}+!\p{Xan}+A/BZ
475
476 /\p{Xsp}+!\p{Xsp}\t/BZ
477
478 /\p{Xps}+!\p{Xps}\t/BZ
479
480 /\p{Xwd}+!\p{Xwd}_/BZ
481
482 /A+\p{N}A+\dB+\p{N}*B+\d*/WBZ
483
484 /-- These behaved oddly in Perl, so they are kept in this test --/
485
486 /(\x{23a}\x{23a}\x{23a})?\1/8i
487 \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
488
489 /(ȺȺȺ)?\1/8i
490 ȺȺȺⱥⱥ
491
492 /(\x{23a}\x{23a}\x{23a})?\1/8i
493 \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
494
495 /(ȺȺȺ)?\1/8i
496 ȺȺȺⱥⱥⱥ
497
498 /(\x{23a}\x{23a}\x{23a})\1/8i
499 \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
500
501 /(ȺȺȺ)\1/8i
502 ȺȺȺⱥⱥ
503
504 /(\x{23a}\x{23a}\x{23a})\1/8i
505 \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
506
507 /(ȺȺȺ)\1/8i
508 ȺȺȺⱥⱥⱥ
509
510 /(\x{2c65}\x{2c65})\1/8i
511 \x{2c65}\x{2c65}\x{23a}\x{23a}
512
513 /(ⱥⱥ)\1/8i
514 ⱥⱥȺȺ
515
516 /(\x{23a}\x{23a}\x{23a})\1Y/8i
517 X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ
518
519 /(\x{2c65}\x{2c65})\1Y/8i
520 X\x{2c65}\x{2c65}\x{23a}\x{23a}YZ
521
522 /-- --/
523
524 /-- These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE --/
525
526 /^[\p{Batak}]/8
527 \x{1bc0}
528 \x{1bff}
529 ** Failers
530 \x{1bf4}
531
532 /^[\p{Brahmi}]/8
533 \x{11000}
534 \x{1106f}
535 ** Failers
536 \x{1104e}
537
538 /^[\p{Mandaic}]/8
539 \x{840}
540 \x{85e}
541 ** Failers
542 \x{85c}
543 \x{85d}
544
545 /-- --/
546
547 /(\X*)(.)/s8
548 A\x{300}
549
550 /^S(\X*)e(\X*)$/8
551 Stéréo
552
553 /^\X/8
554 ́réo
555
556 /^a\X41z/<JS>
557 aX41z
558 *** Failers
559 aAz
560
561 /(?<=ab\Cde)X/8
562
563 /-- End of testinput7 --/

Properties

Name Value
svn:keywords "Author Date Id Revision Url"

  ViewVC Help
Powered by ViewVC 1.1.5