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

Contents of /code/trunk/testdata/testinput5

Parent Directory Parent Directory | Revision Log Revision Log


Revision 462 - (show annotations) (download)
Sat Oct 17 19:55:02 2009 UTC (4 years, 11 months ago) by ph10
File size: 10722 byte(s)
Fix PCRE_PARTIAL_HARD for patterns that end optionally, e.g. abc*

1 /-- This set of tests checks the API, internals, and non-Perl stuff for UTF-8
2 support, excluding Unicode properties. --/
3
4 /\x{100}/8DZ
5
6 /\x{1000}/8DZ
7
8 /\x{10000}/8DZ
9
10 /\x{100000}/8DZ
11
12 /\x{1000000}/8DZ
13
14 /\x{4000000}/8DZ
15
16 /\x{7fffFFFF}/8DZ
17
18 /[\x{ff}]/8DZ
19
20 /[\x{100}]/8DZ
21
22 /\x{ffffffff}/8
23
24 /\x{100000000}/8
25
26 /^\x{100}a\x{1234}/8
27 \x{100}a\x{1234}bcd
28
29 /\x80/8DZ
30
31 /\xff/8DZ
32
33 /\x{0041}\x{2262}\x{0391}\x{002e}/DZ8
34 \x{0041}\x{2262}\x{0391}\x{002e}
35
36 /\x{D55c}\x{ad6d}\x{C5B4}/DZ8
37 \x{D55c}\x{ad6d}\x{C5B4}
38
39 /\x{65e5}\x{672c}\x{8a9e}/DZ8
40 \x{65e5}\x{672c}\x{8a9e}
41
42 /\x{80}/DZ8
43
44 /\x{084}/DZ8
45
46 /\x{104}/DZ8
47
48 /\x{861}/DZ8
49
50 /\x{212ab}/DZ8
51
52 /.{3,5}X/DZ8
53 \x{212ab}\x{212ab}\x{212ab}\x{861}X
54
55
56 /.{3,5}?/DZ8
57 \x{212ab}\x{212ab}\x{212ab}\x{861}
58
59 /(?<=\C)X/8
60 Should produce an error diagnostic
61
62 /-- This one is here not because it's different to Perl, but because the way
63 the captured single-byte is displayed. (In Perl it becomes a character, and you
64 can't tell the difference.) --/
65
66 /X(\C)(.*)/8
67 X\x{1234}
68 X\nabc
69
70 /^[ab]/8DZ
71 bar
72 *** Failers
73 c
74 \x{ff}
75 \x{100}
76
77 /^[^ab]/8DZ
78 c
79 \x{ff}
80 \x{100}
81 *** Failers
82 aaa
83
84 /[^ab\xC0-\xF0]/8SDZ
85 \x{f1}
86 \x{bf}
87 \x{100}
88 \x{1000}
89 *** Failers
90 \x{c0}
91 \x{f0}
92
93 /Ā{3,4}/8SDZ
94 \x{100}\x{100}\x{100}\x{100\x{100}
95
96 /(\x{100}+|x)/8SDZ
97
98 /(\x{100}*a|x)/8SDZ
99
100 /(\x{100}{0,2}a|x)/8SDZ
101
102 /(\x{100}{1,2}a|x)/8SDZ
103
104 /\x{100}*(\d+|"(?1)")/8
105 1234
106 "1234"
107 \x{100}1234
108 "\x{100}1234"
109 \x{100}\x{100}12ab
110 \x{100}\x{100}"12"
111 *** Failers
112 \x{100}\x{100}abcd
113
114 /\x{100}/8DZ
115
116 /\x{100}*/8DZ
117
118 /a\x{100}*/8DZ
119
120 /ab\x{100}*/8DZ
121
122 /a\x{100}\x{101}*/8DZ
123
124 /a\x{100}\x{101}+/8DZ
125
126 /\x{100}*A/8DZ
127 A
128
129 /\x{100}*\d(?R)/8DZ
130
131 /[^\x{c4}]/DZ
132
133 /[^\x{c4}]/8DZ
134
135 /[\x{100}]/8DZ
136 \x{100}
137 Z\x{100}
138 \x{100}Z
139 *** Failers
140
141 /[Z\x{100}]/8DZ
142 Z\x{100}
143 \x{100}
144 \x{100}Z
145 *** Failers
146
147 /[\x{200}-\x{100}]/8
148
149 /[Ā-Ą]/8
150 \x{100}
151 \x{104}
152 *** Failers
153 \x{105}
154 \x{ff}
155
156 /[z-\x{100}]/8DZ
157
158 /[z\Qa-d]Ā\E]/8DZ
159 \x{100}
160 Ā
161
162 /[\xFF]/DZ
163 >\xff<
164
165 /[\xff]/DZ8
166 >\x{ff}<
167
168 /[^\xFF]/DZ
169
170 /[^\xff]/8DZ
171
172 /[Ä-Ü]/8
173 Ö # Matches without Study
174 \x{d6}
175
176 /[Ä-Ü]/8S
177 Ö <-- Same with Study
178 \x{d6}
179
180 /[\x{c4}-\x{dc}]/8
181 Ö # Matches without Study
182 \x{d6}
183
184 /[\x{c4}-\x{dc}]/8S
185 Ö <-- Same with Study
186 \x{d6}
187
188 /[]/8
189
190 //8
191
192 /xxx/8
193
194 /xxx/8?DZ
195
196 /abc/8
197 ]
198
199
200 \?
201
202 /anything/8
203 \xc0\x80
204 \xc1\x8f
205 \xe0\x9f\x80
206 \xf0\x8f\x80\x80
207 \xf8\x87\x80\x80\x80
208 \xfc\x83\x80\x80\x80\x80
209 \xfe\x80\x80\x80\x80\x80
210 \xff\x80\x80\x80\x80\x80
211 \xc3\x8f
212 \xe0\xaf\x80
213 \xe1\x80\x80
214 \xf0\x9f\x80\x80
215 \xf1\x8f\x80\x80
216 \xf8\x88\x80\x80\x80
217 \xf9\x87\x80\x80\x80
218 \xfc\x84\x80\x80\x80\x80
219 \xfd\x83\x80\x80\x80\x80
220 \?\xf8\x88\x80\x80\x80
221 \?\xf9\x87\x80\x80\x80
222 \?\xfc\x84\x80\x80\x80\x80
223 \?\xfd\x83\x80\x80\x80\x80
224
225 /\x{100}abc(xyz(?1))/8DZ
226
227 /[^\x{100}]abc(xyz(?1))/8DZ
228
229 /[ab\x{100}]abc(xyz(?1))/8DZ
230
231 /(\x{100}(b(?2)c))?/DZ8
232
233 /(\x{100}(b(?2)c)){0,2}/DZ8
234
235 /(\x{100}(b(?1)c))?/DZ8
236
237 /(\x{100}(b(?1)c)){0,2}/DZ8
238
239 /\W/8
240 A.B
241 A\x{100}B
242
243 /\w/8
244 \x{100}X
245
246 /a\x{1234}b/P8
247 a\x{1234}b
248
249 /^\ሴ/8DZ
250
251 /\777/I
252
253 /\777/8I
254 \x{1ff}
255 \777
256
257 /\x{100}*\d/8DZ
258
259 /\x{100}*\s/8DZ
260
261 /\x{100}*\w/8DZ
262
263 /\x{100}*\D/8DZ
264
265 /\x{100}*\S/8DZ
266
267 /\x{100}*\W/8DZ
268
269 /\x{100}+\x{200}/8DZ
270
271 /\x{100}+X/8DZ
272
273 /X+\x{200}/8DZ
274
275 /()()()()()()()()()()
276 ()()()()()()()()()()
277 ()()()()()()()()()()
278 ()()()()()()()()()()
279 A (x) (?41) B/8x
280 AxxB
281
282 /^[\x{100}\E-\Q\E\x{150}]/BZ8
283
284 /^[\QĀ\E-\QŐ\E]/BZ8
285
286 /^[\QĀ\E-\QŐ\E/BZ8
287
288 /^abc./mgx8<any>
289 abc1 \x0aabc2 \x0babc3xx \x0cabc4 \x0dabc5xx \x0d\x0aabc6 \x{0085}abc7 \x{2028}abc8 \x{2029}abc9 JUNK
290
291 /abc.$/mgx8<any>
292 abc1\x0a abc2\x0b abc3\x0c abc4\x0d abc5\x0d\x0a abc6\x{0085} abc7\x{2028} abc8\x{2029} abc9
293
294 /^a\Rb/8<bsr_unicode>
295 a\nb
296 a\rb
297 a\r\nb
298 a\x0bb
299 a\x0cb
300 a\x{85}b
301 a\x{2028}b
302 a\x{2029}b
303 ** Failers
304 a\n\rb
305
306 /^a\R*b/8<bsr_unicode>
307 ab
308 a\nb
309 a\rb
310 a\r\nb
311 a\x0bb
312 a\x0c\x{2028}\x{2029}b
313 a\x{85}b
314 a\n\rb
315 a\n\r\x{85}\x0cb
316
317 /^a\R+b/8<bsr_unicode>
318 a\nb
319 a\rb
320 a\r\nb
321 a\x0bb
322 a\x0c\x{2028}\x{2029}b
323 a\x{85}b
324 a\n\rb
325 a\n\r\x{85}\x0cb
326 ** Failers
327 ab
328
329 /^a\R{1,3}b/8<bsr_unicode>
330 a\nb
331 a\n\rb
332 a\n\r\x{85}b
333 a\r\n\r\nb
334 a\r\n\r\n\r\nb
335 a\n\r\n\rb
336 a\n\n\r\nb
337 ** Failers
338 a\n\n\n\rb
339 a\r
340
341 /\H\h\V\v/8
342 X X\x0a
343 X\x09X\x0b
344 ** Failers
345 \x{a0} X\x0a
346
347 /\H*\h+\V?\v{3,4}/8
348 \x09\x20\x{a0}X\x0a\x0b\x0c\x0d\x0a
349 \x09\x20\x{a0}\x0a\x0b\x0c\x0d\x0a
350 \x09\x20\x{a0}\x0a\x0b\x0c
351 ** Failers
352 \x09\x20\x{a0}\x0a\x0b
353
354 /\H\h\V\v/8
355 \x{3001}\x{3000}\x{2030}\x{2028}
356 X\x{180e}X\x{85}
357 ** Failers
358 \x{2009} X\x0a
359
360 /\H*\h+\V?\v{3,4}/8
361 \x{1680}\x{180e}\x{2007}X\x{2028}\x{2029}\x0c\x0d\x0a
362 \x09\x{205f}\x{a0}\x0a\x{2029}\x0c\x{2028}\x0a
363 \x09\x20\x{202f}\x0a\x0b\x0c
364 ** Failers
365 \x09\x{200a}\x{a0}\x{2028}\x0b
366
367 /[\h]/8BZ
368 >\x{1680}
369
370 /[\h]{3,}/8BZ
371 >\x{1680}\x{180e}\x{2000}\x{2003}\x{200a}\x{202f}\x{205f}\x{3000}<
372
373 /[\v]/8BZ
374
375 /[\H]/8BZ
376
377 /[\V]/8BZ
378
379 /.*$/8<any>
380 \x{1ec5}
381
382 /-- This tests the stricter UTF-8 check according to RFC 3629. --/
383
384 /X/8
385 \x{0}\x{d7ff}\x{e000}\x{10ffff}
386 \x{d800}
387 \x{d800}\?
388 \x{da00}
389 \x{da00}\?
390 \x{dfff}
391 \x{dfff}\?
392 \x{110000}
393 \x{110000}\?
394 \x{2000000}
395 \x{2000000}\?
396 \x{7fffffff}
397 \x{7fffffff}\?
398
399 /a\Rb/I8<bsr_anycrlf>
400 a\rb
401 a\nb
402 a\r\nb
403 ** Failers
404 a\x{85}b
405 a\x0bb
406
407 /a\Rb/I8<bsr_unicode>
408 a\rb
409 a\nb
410 a\r\nb
411 a\x{85}b
412 a\x0bb
413 ** Failers
414 a\x{85}b\<bsr_anycrlf>
415 a\x0bb\<bsr_anycrlf>
416
417 /a\R?b/I8<bsr_anycrlf>
418 a\rb
419 a\nb
420 a\r\nb
421 ** Failers
422 a\x{85}b
423 a\x0bb
424
425 /a\R?b/I8<bsr_unicode>
426 a\rb
427 a\nb
428 a\r\nb
429 a\x{85}b
430 a\x0bb
431 ** Failers
432 a\x{85}b\<bsr_anycrlf>
433 a\x0bb\<bsr_anycrlf>
434
435 /.*a.*=.b.*/8<ANY>
436 QQQ\x{2029}ABCaXYZ=!bPQR
437 ** Failers
438 a\x{2029}b
439 \x61\xe2\x80\xa9\x62
440
441 /[[:a\x{100}b:]]/8
442
443 /a[^]b/<JS>8
444 a\x{1234}b
445 a\nb
446 ** Failers
447 ab
448
449 /a[^]+b/<JS>8
450 aXb
451 a\nX\nX\x{1234}b
452 ** Failers
453 ab
454
455 /(\x{de})\1/
456 \x{de}\x{de}
457 \x{123}
458
459 /X/8f<any>
460 A\x{1ec5}ABCXYZ
461
462 /(*UTF8)\x{1234}/
463 abcd\x{1234}pqr
464
465 /(*CRLF)(*UTF8)(*BSR_UNICODE)a\Rb/I
466
467 /Xa{2,4}b/8
468 X\P
469 Xa\P
470 Xaa\P
471 Xaaa\P
472 Xaaaa\P
473
474 /Xa{2,4}?b/8
475 X\P
476 Xa\P
477 Xaa\P
478 Xaaa\P
479 Xaaaa\P
480
481 /Xa{2,4}+b/8
482 X\P
483 Xa\P
484 Xaa\P
485 Xaaa\P
486 Xaaaa\P
487
488 /X\x{123}{2,4}b/8
489 X\P
490 X\x{123}\P
491 X\x{123}\x{123}\P
492 X\x{123}\x{123}\x{123}\P
493 X\x{123}\x{123}\x{123}\x{123}\P
494
495 /X\x{123}{2,4}?b/8
496 X\P
497 X\x{123}\P
498 X\x{123}\x{123}\P
499 X\x{123}\x{123}\x{123}\P
500 X\x{123}\x{123}\x{123}\x{123}\P
501
502 /X\x{123}{2,4}+b/8
503 X\P
504 X\x{123}\P
505 X\x{123}\x{123}\P
506 X\x{123}\x{123}\x{123}\P
507 X\x{123}\x{123}\x{123}\x{123}\P
508
509 /X\x{123}{2,4}b/8
510 Xx\P
511 X\x{123}x\P
512 X\x{123}\x{123}x\P
513 X\x{123}\x{123}\x{123}x\P
514 X\x{123}\x{123}\x{123}\x{123}x\P
515
516 /X\x{123}{2,4}?b/8
517 Xx\P
518 X\x{123}x\P
519 X\x{123}\x{123}x\P
520 X\x{123}\x{123}\x{123}x\P
521 X\x{123}\x{123}\x{123}\x{123}x\P
522
523 /X\x{123}{2,4}+b/8
524 Xx\P
525 X\x{123}x\P
526 X\x{123}\x{123}x\P
527 X\x{123}\x{123}\x{123}x\P
528 X\x{123}\x{123}\x{123}\x{123}x\P
529
530 /X\d{2,4}b/8
531 X\P
532 X3\P
533 X33\P
534 X333\P
535 X3333\P
536
537 /X\d{2,4}?b/8
538 X\P
539 X3\P
540 X33\P
541 X333\P
542 X3333\P
543
544 /X\d{2,4}+b/8
545 X\P
546 X3\P
547 X33\P
548 X333\P
549 X3333\P
550
551 /X\D{2,4}b/8
552 X\P
553 Xa\P
554 Xaa\P
555 Xaaa\P
556 Xaaaa\P
557
558 /X\D{2,4}?b/8
559 X\P
560 Xa\P
561 Xaa\P
562 Xaaa\P
563 Xaaaa\P
564
565 /X\D{2,4}+b/8
566 X\P
567 Xa\P
568 Xaa\P
569 Xaaa\P
570 Xaaaa\P
571
572 /X\D{2,4}b/8
573 X\P
574 X\x{123}\P
575 X\x{123}\x{123}\P
576 X\x{123}\x{123}\x{123}\P
577 X\x{123}\x{123}\x{123}\x{123}\P
578
579 /X\D{2,4}?b/8
580 X\P
581 X\x{123}\P
582 X\x{123}\x{123}\P
583 X\x{123}\x{123}\x{123}\P
584 X\x{123}\x{123}\x{123}\x{123}\P
585
586 /X\D{2,4}+b/8
587 X\P
588 X\x{123}\P
589 X\x{123}\x{123}\P
590 X\x{123}\x{123}\x{123}\P
591 X\x{123}\x{123}\x{123}\x{123}\P
592
593 /X[abc]{2,4}b/8
594 X\P
595 Xa\P
596 Xaa\P
597 Xaaa\P
598 Xaaaa\P
599
600 /X[abc]{2,4}?b/8
601 X\P
602 Xa\P
603 Xaa\P
604 Xaaa\P
605 Xaaaa\P
606
607 /X[abc]{2,4}+b/8
608 X\P
609 Xa\P
610 Xaa\P
611 Xaaa\P
612 Xaaaa\P
613
614 /X[abc\x{123}]{2,4}b/8
615 X\P
616 X\x{123}\P
617 X\x{123}\x{123}\P
618 X\x{123}\x{123}\x{123}\P
619 X\x{123}\x{123}\x{123}\x{123}\P
620
621 /X[abc\x{123}]{2,4}?b/8
622 X\P
623 X\x{123}\P
624 X\x{123}\x{123}\P
625 X\x{123}\x{123}\x{123}\P
626 X\x{123}\x{123}\x{123}\x{123}\P
627
628 /X[abc\x{123}]{2,4}+b/8
629 X\P
630 X\x{123}\P
631 X\x{123}\x{123}\P
632 X\x{123}\x{123}\x{123}\P
633 X\x{123}\x{123}\x{123}\x{123}\P
634
635 /X[^a]{2,4}b/8
636 X\P
637 Xz\P
638 Xzz\P
639 Xzzz\P
640 Xzzzz\P
641
642 /X[^a]{2,4}?b/8
643 X\P
644 Xz\P
645 Xzz\P
646 Xzzz\P
647 Xzzzz\P
648
649 /X[^a]{2,4}+b/8
650 X\P
651 Xz\P
652 Xzz\P
653 Xzzz\P
654 Xzzzz\P
655
656 /X[^a]{2,4}b/8
657 X\P
658 X\x{123}\P
659 X\x{123}\x{123}\P
660 X\x{123}\x{123}\x{123}\P
661 X\x{123}\x{123}\x{123}\x{123}\P
662
663 /X[^a]{2,4}?b/8
664 X\P
665 X\x{123}\P
666 X\x{123}\x{123}\P
667 X\x{123}\x{123}\x{123}\P
668 X\x{123}\x{123}\x{123}\x{123}\P
669
670 /X[^a]{2,4}+b/8
671 X\P
672 X\x{123}\P
673 X\x{123}\x{123}\P
674 X\x{123}\x{123}\x{123}\P
675 X\x{123}\x{123}\x{123}\x{123}\P
676
677 /(Y)X\1{2,4}b/8
678 YX\P
679 YXY\P
680 YXYY\P
681 YXYYY\P
682 YXYYYY\P
683
684 /(Y)X\1{2,4}?b/8
685 YX\P
686 YXY\P
687 YXYY\P
688 YXYYY\P
689 YXYYYY\P
690
691 /(Y)X\1{2,4}+b/8
692 YX\P
693 YXY\P
694 YXYY\P
695 YXYYY\P
696 YXYYYY\P
697
698 /(\x{123})X\1{2,4}b/8
699 \x{123}X\P
700 \x{123}X\x{123}\P
701 \x{123}X\x{123}\x{123}\P
702 \x{123}X\x{123}\x{123}\x{123}\P
703 \x{123}X\x{123}\x{123}\x{123}\x{123}\P
704
705 /(\x{123})X\1{2,4}?b/8
706 \x{123}X\P
707 \x{123}X\x{123}\P
708 \x{123}X\x{123}\x{123}\P
709 \x{123}X\x{123}\x{123}\x{123}\P
710 \x{123}X\x{123}\x{123}\x{123}\x{123}\P
711
712 /(\x{123})X\1{2,4}+b/8
713 \x{123}X\P
714 \x{123}X\x{123}\P
715 \x{123}X\x{123}\x{123}\P
716 \x{123}X\x{123}\x{123}\x{123}\P
717 \x{123}X\x{123}\x{123}\x{123}\x{123}\P
718
719 /\bthe cat\b/8
720 the cat\P
721 the cat\P\P
722
723 /abcd*/8
724 xxxxabcd\P
725 xxxxabcd\P\P
726
727 /abcd*/i8
728 xxxxabcd\P
729 xxxxabcd\P\P
730 XXXXABCD\P
731 XXXXABCD\P\P
732
733 /abc\d*/8
734 xxxxabc1\P
735 xxxxabc1\P\P
736
737 /(a)bc\1*/8
738 xxxxabca\P
739 xxxxabca\P\P
740
741 /abc[de]*/8
742 xxxxabcde\P
743 xxxxabcde\P\P
744
745 /-- End of testinput5 --/

Properties

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

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12