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

Diff of /code/trunk/testdata/testinput2

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 459 by ph10, Sun Oct 4 09:21:39 2009 UTC revision 500 by ph10, Sat Mar 6 19:00:29 2010 UTC
# Line 344  Line 344 
344      *** Failers      *** Failers
345      a      a
346    
347  /This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/I  /This one is here because Perl behaves differently; see also the following/I
348    
349  /^(a\1?){4}$/I  /^(a\1?){4}$/I
350        aaaa
351      aaaaaa      aaaaaa
352    
353    /Perl does not fail these two for the final subjects. Neither did PCRE until/
354    /release 8.01. The problem is in backtracking into a subpattern that contains/
355    /a recursive reference to itself. PCRE has now made these into atomic patterns./
356    
357    /^(xa|=?\1a){2}$/
358        xa=xaa
359        ** Failers
360        xa=xaaa
361    
362    /^(xa|=?\1a)+$/
363        xa=xaa
364        ** Failers
365        xa=xaaa
366    
367  /These are syntax tests from Perl 5.005/I  /These are syntax tests from Perl 5.005/I
368    
# Line 3113  a random value. /Ix Line 3128  a random value. /Ix
3128      b"11111      b"11111
3129      a"11111      a"11111
3130    
3131  /^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDx  /^(?|(a)(b)(c)(?<D>d)|(?<D>e)) (?('D')X|Y)/JDZx
3132      abcdX      abcdX
3133      eX      eX
3134      ** Failers      ** Failers
3135      abcdY      abcdY
3136      ey      ey
3137    
3138  /(?<A>a) (b)(c)  (?<A>d  (?(R&A)$ | (?4)) )/JDx  /(?<A>a) (b)(c)  (?<A>d  (?(R&A)$ | (?4)) )/JDZx
3139      abcdd      abcdd
3140      ** Failers      ** Failers
3141      abcdde      abcdde
3142    
3143    /abcd*/
3144        xxxxabcd\P
3145        xxxxabcd\P\P
3146    
3147    /abcd*/i
3148        xxxxabcd\P
3149        xxxxabcd\P\P
3150        XXXXABCD\P
3151        XXXXABCD\P\P
3152    
3153    /abc\d*/
3154        xxxxabc1\P
3155        xxxxabc1\P\P
3156    
3157    /(a)bc\1*/
3158        xxxxabca\P
3159        xxxxabca\P\P
3160    
3161    /abc[de]*/
3162        xxxxabcde\P
3163        xxxxabcde\P\P
3164    
3165    /-- This is not in the Perl 5.10 test because Perl seems currently to be broken
3166        and not behaving as specified in that it *does* bumpalong after hitting
3167        (*COMMIT). --/
3168    
3169    /(?1)(A(*COMMIT)|B)D/
3170        ABD
3171        XABD
3172        BAD
3173        ABXABD
3174        ** Failers
3175        ABX
3176        BAXBAD
3177    
3178    /(\3)(\1)(a)/<JS>
3179        cat
3180    
3181    /(\3)(\1)(a)/SI<JS>
3182        cat
3183    
3184    /(\3)(\1)(a)/SI
3185        cat
3186    
3187    /i(?(DEFINE)(?<s>a))/SI
3188        i
3189    
3190    /()i(?(1)a)/SI
3191        ia
3192    
3193    /(?i)a(?-i)b|c/BZ
3194        XabX
3195        XAbX
3196        CcC
3197        ** Failers
3198        XABX
3199    
3200    /(?i)a(?s)b|c/BZ
3201    
3202    /(?i)a(?s-i)b|c/BZ
3203    
3204    /^(ab(c\1)d|x){2}$/BZ
3205        xabcxd
3206    
3207    /^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
3208    
3209    /^(?&t)*(?(DEFINE)(?<t>.))$/BZ
3210    
3211    / -- The first four of these are not in the Perl 5.10 test because Perl
3212         documents that the use of \K in assertions is "not well defined". The
3213         last is here because Perl gives the match as "b" rather than "ab". I
3214         believe this to be a Perl bug. --/
3215    
3216    /(?=a\Kb)ab/
3217        ab
3218    
3219    /(?!a\Kb)ac/
3220        ac
3221    
3222    /^abc(?<=b\Kc)d/
3223        abcd
3224    
3225    /^abc(?<!b\Kq)d/
3226        abcd
3227    
3228    /(?>a\Kb)z|(ab)/
3229        ab
3230    
3231    /----------------------/
3232    
3233  /-- End of testinput2 --/  /-- End of testinput2 --/

Legend:
Removed from v.459  
changed lines
  Added in v.500

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12