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

Diff of /code/trunk/testdata/testoutput2

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

revision 770 by ph10, Fri Nov 25 10:04:12 2011 UTC revision 771 by ph10, Tue Nov 29 15:34:12 2011 UTC
# Line 10992  No match Line 10992  No match
10992      AC      AC
10993  No match  No match
10994    
 /--- A whole lot of tests of verbs with arguments are here rather than in test  
      11 because Perl doesn't seem to follow its specification entirely  
      correctly. ---/  
   
 /--- Perl 5.11 sets $REGERROR on the AC failure case here; PCRE does not. It is  
      not clear how Perl defines "involved in the failure of the match". ---/  
   
 /^(A(*THEN:A)B|C(*THEN:B)D)/K  
     AB  
  0: AB  
  1: AB  
     CD  
  0: CD  
  1: CD  
     ** Failers  
 No match  
     AC  
 No match  
     CB  
 No match, mark = B  
   
 /--- Check the use of names for success and failure. PCRE doesn't show these  
 names for success, though Perl does, contrary to its spec. ---/  
   
 /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K  
     AB  
  0: AB  
  1: AB  
     CD  
  0: CD  
  1: CD  
     ** Failers  
 No match  
     AC  
 No match, mark = A  
     CB  
 No match, mark = B  
   
 /--- An empty name does not pass back an empty string. It is the same as if no  
 name were given. ---/  
   
 /^(A(*PRUNE:)B|C(*PRUNE:B)D)/K  
     AB  
  0: AB  
  1: AB  
     CD  
  0: CD  
  1: CD  
   
 /--- PRUNE goes to next bumpalong; COMMIT does not. ---/  
   
 /A(*PRUNE:A)B/K  
     ACAB  
  0: AB  
   
 /(*MARK:A)(*PRUNE:B)(C|X)/KS  
     C  
  0: C  
  1: C  
 MK: A  
     D  
 No match  
   
 /(*MARK:A)(*PRUNE:B)(C|X)/KSS  
     C  
  0: C  
  1: C  
 MK: A  
     D  
 No match, mark = B  
   
 /(*MARK:A)(*THEN:B)(C|X)/KS  
     C  
  0: C  
  1: C  
 MK: A  
     D  
 No match  
   
 /(*MARK:A)(*THEN:B)(C|X)/KSY  
     C  
  0: C  
  1: C  
 MK: A  
     D  
 No match, mark = B  
   
 /(*MARK:A)(*THEN:B)(C|X)/KSS  
     C  
  0: C  
  1: C  
 MK: A  
     D  
 No match, mark = B  
   
 /--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/  
   
 /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK  
     AAAC  
 No match  
   
 /--- Same --/  
   
 /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK  
     AAAC  
 No match  
   
10995  /--- This should fail; the SKIP advances by one, but when we get to AC, the  /--- This should fail; the SKIP advances by one, but when we get to AC, the
10996       PRUNE kills it. ---/       PRUNE kills it. Perl behaves differently. ---/
10997    
10998  /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK  /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
10999      AAAC      AAAC
11000  No match  No match, mark = A
   
 /A(*:A)A+(*SKIP)(B|Z) | AC/xK  
     AAAC  
 No match  
   
 /--- This should fail, as a null name is the same as no name ---/  
   
 /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK  
     AAAC  
 No match  
   
 /--- This fails in PCRE, and I think that is in accordance with Perl's  
      documentation, though in Perl it succeeds. ---/  
   
 /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK  
     AAAC  
 No match  
11001    
11002  /--- Mark names can be duplicated ---/  /--- Mark names can be duplicated. Perl doesn't give a mark for this one,
11003    though PCRE does. ---/
11004    
 /A(*:A)B|X(*:A)Y/K  
     AABC  
  0: AB  
 MK: A  
     XXYZ  
  0: XY  
 MK: A  
   
11005  /^A(*:A)B|^X(*:A)Y/K  /^A(*:A)B|^X(*:A)Y/K
11006      ** Failers      ** Failers
11007  No match  No match
11008      XAQQ      XAQQ
11009  No match, mark = A  No match, mark = A
11010    
 /--- A check on what happens after hitting a mark and them bumping along to  
 something that does not even start. Perl reports tags after the failures here,  
 though it does not when the individual letters are made into something  
 more complicated. ---/  
   
 /A(*:A)B|XX(*:B)Y/K  
     AABC  
  0: AB  
 MK: A  
     XXYZ  
  0: XXY  
 MK: B  
     ** Failers  
 No match  
     XAQQ  
 No match  
     XAQQXZZ  
 No match  
     AXQQQ  
 No match  
     AXXQQQ  
 No match  
   
11011  /--- COMMIT at the start of a pattern should be the same as an anchor. Perl  /--- COMMIT at the start of a pattern should be the same as an anchor. Perl
11012  optimizations defeat this. So does the PCRE optimization unless we disable it  optimizations defeat this. So does the PCRE optimization unless we disable it
11013  with \Y. ---/  with \Y. ---/
# Line 11174  No match Line 11020  No match
11020      DEFGABC\Y      DEFGABC\Y
11021  No match  No match
11022    
 /--- Repeat some tests with added studying. ---/  
   
 /A(*COMMIT)B/+KS  
     ACABX  
 No match  
   
 /A(*THEN)B|A(*THEN)C/KS  
     AC  
  0: AC  
   
 /A(*PRUNE)B|A(*PRUNE)C/KS  
     AC  
 No match  
   
 /^(A(*THEN:A)B|C(*THEN:B)D)/KS  
     AB  
  0: AB  
  1: AB  
     CD  
  0: CD  
  1: CD  
     ** Failers  
 No match  
     AC  
 No match  
     CB  
 No match, mark = B  
   
 /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/KS  
     AB  
  0: AB  
  1: AB  
     CD  
  0: CD  
  1: CD  
     ** Failers  
 No match  
     AC  
 No match, mark = A  
     CB  
 No match, mark = B  
   
 /^(A(*PRUNE:)B|C(*PRUNE:B)D)/KS  
     AB  
  0: AB  
  1: AB  
     CD  
  0: CD  
  1: CD  
   
 /A(*PRUNE:A)B/KS  
     ACAB  
  0: AB  
   
 /(*MARK:A)(*PRUNE:B)(C|X)/KS  
     C  
  0: C  
  1: C  
 MK: A  
     D  
 No match  
   
 /(*MARK:A)(*THEN:B)(C|X)/KS  
     C  
  0: C  
  1: C  
 MK: A  
     D  
 No match  
   
 /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS  
     AAAC  
 No match  
   
 /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xKS  
     AAAC  
 No match  
   
 /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xKS  
     AAAC  
 No match  
   
 /A(*:A)A+(*SKIP)(B|Z) | AC/xKS  
     AAAC  
 No match  
   
 /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xKS  
     AAAC  
 No match  
   
 /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xKS  
     AAAC  
 No match  
   
 /A(*:A)B|XX(*:B)Y/KS  
     AABC  
  0: AB  
 MK: A  
     XXYZ  
  0: XXY  
 MK: B  
     ** Failers  
 No match  
     XAQQ  
 No match  
     XAQQXZZ  
 No match  
     AXQQQ  
 No match  
     AXXQQQ  
 No match  
   
 /(*COMMIT)ABC/  
     ABCDEFG  
  0: ABC  
     ** Failers  
 No match  
     DEFGABC\Y  
 No match  
   
11023  /^(ab (c+(*THEN)cd) | xyz)/x  /^(ab (c+(*THEN)cd) | xyz)/x
11024      abcccd      abcccd
11025  No match  No match
# Line 11878  No match Line 11604  No match
11604   1: C   1: C
11605  MK: A  MK: A
11606      D      D
11607  No match  No match, mark = A
11608    
11609  /(*:A)A+(*SKIP:A)(B|Z)/KS  /(*:A)A+(*SKIP:A)(B|Z)/KS
11610      AAAC      AAAC
11611  No match  No match, mark = A
11612    
11613  /-- --/  /-- --/
11614    
# Line 12260  Latest Mark: A Line 11986  Latest Mark: A
11986  Latest Mark: B  Latest Mark: B
11987  +18 ^ ^          z  +18 ^ ^          z
11988  +20 ^            a  +20 ^            a
 Latest Mark: <unset>  
11989  +21 ^^           e  +21 ^^           e
11990  +22 ^ ^          q  +22 ^ ^          q
11991  +23 ^  ^         )  +23 ^  ^         )
# Line 12597  Failed: too many forward references at o Line 12322  Failed: too many forward references at o
12322    
12323  /(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/  /(a)(?(DEFINE)(b))(?2){0,1999}?(?2)/
12324    
12325    /--- This test, with something more complicated than individual letters, causes
12326    different behaviour in Perl. Perhaps it disables some optimization; no tag is
12327    passed back for the failures, whereas in PCRE there is a tag. ---/
12328    
12329    /(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
12330        AABC
12331     0: AB
12332     1: A
12333     2: B
12334    MK: A
12335        XXYZ
12336     0: XXY
12337     1: <unset>
12338     2: <unset>
12339     3: X
12340     4: X
12341     5: Y
12342    MK: B
12343        ** Failers
12344    No match
12345        XAQQ
12346    No match, mark = A
12347        XAQQXZZ
12348    No match, mark = A
12349        AXQQQ
12350    No match, mark = A
12351        AXXQQQ
12352    No match, mark = B
12353    
12354    /-- Perl doesn't give marks for these, though it does if the alternatives are
12355    replaced by single letters. --/
12356    
12357    /(b|q)(*:m)f|a(*:n)w/K
12358        aw
12359     0: aw
12360    MK: n
12361        ** Failers
12362    No match, mark = n
12363        abc
12364    No match, mark = m
12365    
12366    /(q|b)(*:m)f|a(*:n)w/K
12367        aw
12368     0: aw
12369    MK: n
12370        ** Failers
12371    No match, mark = n
12372        abc
12373    No match, mark = m
12374    
12375    /-- After a partial match, the behaviour is as for a failure. --/
12376    
12377    /^a(*:X)bcde/K
12378       abc\P
12379    Partial match, mark=X: abc
12380    
12381  /-- End of testinput2 --/  /-- End of testinput2 --/

Legend:
Removed from v.770  
changed lines
  Added in v.771

  ViewVC Help
Powered by ViewVC 1.1.5