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

Contents of /code/trunk/testdata/testinput7

Parent Directory Parent Directory | Revision Log Revision Log


Revision 973 - (show annotations) (download)
Fri Jun 1 18:38:40 2012 UTC (2 years, 3 months ago) by ph10
File size: 9035 byte(s)
Some tests were in the wrong files.

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 /[[:cntrl:]]/WBZ
401
402 /[[:digit:]]/WBZ
403
404 /[[:graph:]]/WBZ
405
406 /[[:print:]]/WBZ
407
408 /[[:punct:]]/WBZ
409
410 /[[:space:]]/WBZ
411
412 /[[:word:]]/WBZ
413
414 /[[:xdigit:]]/WBZ
415
416 /-- Unicode properties for \b abd \B --/
417
418 /\b...\B/8W
419 abc_
420 \x{37e}abc\x{376}
421 \x{37e}\x{376}\x{371}\x{393}\x{394}
422 !\x{c0}++\x{c1}\x{c2}
423 !\x{c0}+++++
424
425 /-- Without PCRE_UCP, non-ASCII always fail, even if < 256 --/
426
427 /\b...\B/8
428 abc_
429 ** Failers
430 \x{37e}abc\x{376}
431 \x{37e}\x{376}\x{371}\x{393}\x{394}
432 !\x{c0}++\x{c1}\x{c2}
433 !\x{c0}+++++
434
435 /-- With PCRE_UCP, non-UTF8 chars that are < 256 still check properties --/
436
437 /\b...\B/W
438 abc_
439 !\x{c0}++\x{c1}\x{c2}
440 !\x{c0}+++++
441
442 /-- Some of these are silly, but they check various combinations --/
443
444 /[[:^alpha:][:^cntrl:]]+/8WBZ
445 123
446 abc
447
448 /[[:^cntrl:][:^alpha:]]+/8WBZ
449 123
450 abc
451
452 /[[:alpha:]]+/8WBZ
453 abc
454
455 /[[:^alpha:]\S]+/8WBZ
456 123
457 abc
458
459 /[^\d]+/8WBZ
460 abc123
461 abc\x{123}
462 \x{660}abc
463
464 /\p{Lu}+9\p{Lu}+B\p{Lu}+b/BZ
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{Han}+X\p{Greek}+\x{370}/BZ8
471
472 /\p{Xan}+!\p{Xan}+A/BZ
473
474 /\p{Xsp}+!\p{Xsp}\t/BZ
475
476 /\p{Xps}+!\p{Xps}\t/BZ
477
478 /\p{Xwd}+!\p{Xwd}_/BZ
479
480 /A+\p{N}A+\dB+\p{N}*B+\d*/WBZ
481
482 /-- These behaved oddly in Perl, so they are kept in this test --/
483
484 /(\x{23a}\x{23a}\x{23a})?\1/8i
485 \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
486
487 /(ȺȺȺ)?\1/8i
488 ȺȺȺⱥⱥ
489
490 /(\x{23a}\x{23a}\x{23a})?\1/8i
491 \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
492
493 /(ȺȺȺ)?\1/8i
494 ȺȺȺⱥⱥⱥ
495
496 /(\x{23a}\x{23a}\x{23a})\1/8i
497 \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}
498
499 /(ȺȺȺ)\1/8i
500 ȺȺȺⱥⱥ
501
502 /(\x{23a}\x{23a}\x{23a})\1/8i
503 \x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}
504
505 /(ȺȺȺ)\1/8i
506 ȺȺȺⱥⱥⱥ
507
508 /(\x{2c65}\x{2c65})\1/8i
509 \x{2c65}\x{2c65}\x{23a}\x{23a}
510
511 /(ⱥⱥ)\1/8i
512 ⱥⱥȺȺ
513
514 /(\x{23a}\x{23a}\x{23a})\1Y/8i
515 X\x{23a}\x{23a}\x{23a}\x{2c65}\x{2c65}\x{2c65}YZ
516
517 /(\x{2c65}\x{2c65})\1Y/8i
518 X\x{2c65}\x{2c65}\x{23a}\x{23a}YZ
519
520 /-- --/
521
522 /-- These scripts weren't yet in Perl when I added Unicode 6.0.0 to PCRE --/
523
524 /^[\p{Batak}]/8
525 \x{1bc0}
526 \x{1bff}
527 ** Failers
528 \x{1bf4}
529
530 /^[\p{Brahmi}]/8
531 \x{11000}
532 \x{1106f}
533 ** Failers
534 \x{1104e}
535
536 /^[\p{Mandaic}]/8
537 \x{840}
538 \x{85e}
539 ** Failers
540 \x{85c}
541 \x{85d}
542
543 /-- --/
544
545 /(\X*)(.)/s8
546 A\x{300}
547
548 /^S(\X*)e(\X*)$/8
549 Stéréo
550
551 /^\X/8
552 ́réo
553
554 /^a\X41z/<JS>
555 aX41z
556 *** Failers
557 aAz
558
559 /(?<=ab\Cde)X/8
560
561 /\X/
562 a\P
563 a\P\P
564
565 /\Xa/
566 aa\P
567 aa\P\P
568
569 /\X{2}/
570 aa\P
571 aa\P\P
572
573 /\X+a/
574 a\P
575 aa\P
576 aa\P\P
577
578 /\X+?a/
579 a\P
580 ab\P
581 aa\P
582 aa\P\P
583 aba\P
584
585 /-- These Unicode 6.1.0 scripts are not known to Perl. --/
586
587 /\p{Chakma}\d/8W
588 \x{11100}\x{1113c}
589
590 /\p{Takri}\d/8W
591 \x{11680}\x{116c0}
592
593 /^\X/8
594 A\P
595 A\P\P
596 A\x{300}\x{301}\P
597 A\x{300}\x{301}\P\P
598 A\x{301}\P
599 A\x{301}\P\P
600
601 /^\X{2,3}/8
602 A\P
603 A\P\P
604 AA\P
605 AA\P\P
606 A\x{300}\x{301}\P
607 A\x{300}\x{301}\P\P
608 A\x{300}\x{301}A\x{300}\x{301}\P
609 A\x{300}\x{301}A\x{300}\x{301}\P\P
610
611 /^\X{2}/8
612 AA\P
613 AA\P\P
614 A\x{300}\x{301}A\x{300}\x{301}\P
615 A\x{300}\x{301}A\x{300}\x{301}\P\P
616
617 /^\X+/8
618 AA\P
619 AA\P\P
620
621 /^\X+?Z/8
622 AA\P
623 AA\P\P
624
625 /-- End of testinput7 --/

Properties

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

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12