/[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 500 by ph10, Sat Mar 6 19:00:29 2010 UTC revision 514 by ph10, Mon May 3 12:54:22 2010 UTC
# Line 2  Line 2 
2      of PCRE's API, error diagnostics, and the compiled code of some patterns.      of PCRE's API, error diagnostics, and the compiled code of some patterns.
3      It also checks the non-Perl syntax the PCRE supports (Python, .NET,      It also checks the non-Perl syntax the PCRE supports (Python, .NET,
4      Oniguruma). Finally, there are some tests where PCRE and Perl differ,      Oniguruma). Finally, there are some tests where PCRE and Perl differ,
5      either because PCRE can't be compatible, or there is potential Perl      either because PCRE can't be compatible, or there is a possible Perl
6      bug. --/      bug. --/
7    
8  /-- Originally, the Perl 5.10 things were in here too, but now I have separated  /-- Originally, the Perl 5.10 and 5.11 things were in here too, but now I have
9      many (most?) of them out into test 11. However, there may still be some      separated many (most?) of them out into test 11. However, there may still
10      that were overlooked. --/      be some that were overlooked. --/
11    
12  /(a)b|/I  /(a)b|/I
13  Capturing subpattern count = 1  Capturing subpattern count = 1
# Line 103  Failed: missing terminating ] for charac Line 103  Failed: missing terminating ] for charac
103  /(?X)[\B]/  /(?X)[\B]/
104  Failed: invalid escape sequence in character class at offset 6  Failed: invalid escape sequence in character class at offset 6
105    
106    /(?X)[\R]/
107    Failed: invalid escape sequence in character class at offset 6
108    
109    /(?X)[\X]/
110    Failed: invalid escape sequence in character class at offset 6
111    
112    /[\B]/BZ
113    ------------------------------------------------------------------
114            Bra
115            B
116            Ket
117            End
118    ------------------------------------------------------------------
119    
120    /[\R]/BZ
121    ------------------------------------------------------------------
122            Bra
123            R
124            Ket
125            End
126    ------------------------------------------------------------------
127    
128    /[\X]/BZ
129    ------------------------------------------------------------------
130            Bra
131            X
132            Ket
133            End
134    ------------------------------------------------------------------
135    
136  /[z-a]/  /[z-a]/
137  Failed: range out of order in character class at offset 3  Failed: range out of order in character class at offset 3
138    
# Line 3198  Failed: POSIX collating elements are not Line 3228  Failed: POSIX collating elements are not
3228  Failed: POSIX named classes are supported only within a class at offset 0  Failed: POSIX named classes are supported only within a class at offset 0
3229    
3230  /\l/I  /\l/I
3231  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3232    
3233  /\L/I  /\L/I
3234  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3235    
3236  /\N{name}/I  /\N{name}/I
3237  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3238    
3239  /\u/I  /\u/I
3240  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3241    
3242  /\U/I  /\U/I
3243  Failed: PCRE does not support \L, \l, \N, \U, or \u at offset 1  Failed: PCRE does not support \L, \l, \N{name}, \U, or \u at offset 1
3244    
3245  /[/I  /[/I
3246  Failed: missing terminating ] for character class at offset 1  Failed: missing terminating ] for character class at offset 1
# Line 8667  No match Line 8697  No match
8697  +13   ^  ^      (*FAIL)  +13   ^  ^      (*FAIL)
8698  No match  No match
8699    
 /a(*PRUNE:XXX)b/  
 Failed: (*VERB) with an argument is not supported at offset 8  
   
8700  /a(*MARK)b/  /a(*MARK)b/
8701  Failed: (*VERB) not recognized at offset 7  Failed: (*MARK) must have an argument at offset 7
8702    
8703  /(?i:A{1,}\6666666666)/  /(?i:A{1,}\6666666666)/
8704  Failed: number is too big at offset 19  Failed: number is too big at offset 19
# Line 10665  No match Line 10692  No match
10692    
10693  /----------------------/  /----------------------/
10694    
10695    /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
10696    Failed: recursive call could loop indefinitely at offset 31
10697    
10698    /abc(*MARK:)pqr/
10699    Failed: (*MARK) must have an argument at offset 10
10700    
10701    /abc(*:)pqr/
10702    Failed: (*MARK) must have an argument at offset 6
10703    
10704    /abc(*FAIL:123)xyz/
10705    Failed: an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) at offset 13
10706    
10707    /--- This should, and does, fail. In Perl, it does not, which I think is a
10708         bug because replacing the B in the pattern by (B|D) does make it fail. ---/
10709    
10710    /A(*COMMIT)B/+K
10711        ACABX
10712    No match
10713    
10714    /--- These should be different, but in Perl 5.11 are not, which I think
10715         is a bug in Perl. ---/
10716    
10717    /A(*THEN)B|A(*THEN)C/K
10718        AC
10719     0: AC
10720    
10721    /A(*PRUNE)B|A(*PRUNE)C/K
10722        AC
10723    No match
10724    
10725    /--- A whole lot of tests of verbs with arguments are here rather than in test
10726         11 because Perl doesn't seem to follow its specification entirely
10727         correctly. ---/
10728    
10729    /--- Perl 5.11 sets $REGERROR on the AC failure case here; PCRE does not. It is
10730         not clear how Perl defines "involved in the failure of the match". ---/
10731    
10732    /^(A(*THEN:A)B|C(*THEN:B)D)/K
10733        AB
10734     0: AB
10735     1: AB
10736        CD
10737     0: CD
10738     1: CD
10739        ** Failers
10740    No match
10741        AC
10742    No match
10743        CB
10744    No match, mark = B
10745    
10746    /--- Check the use of names for success and failure. PCRE doesn't show these
10747    names for success, though Perl does, contrary to its spec. ---/
10748    
10749    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
10750        AB
10751     0: AB
10752     1: AB
10753        CD
10754     0: CD
10755     1: CD
10756        ** Failers
10757    No match
10758        AC
10759    No match, mark = A
10760        CB
10761    No match, mark = B
10762    
10763    /--- An empty name does not pass back an empty string. It is the same as if no
10764    name were given. ---/
10765    
10766    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
10767        AB
10768     0: AB
10769     1: AB
10770        CD
10771     0: CD
10772     1: CD
10773    
10774    /--- PRUNE goes to next bumpalong; COMMIT does not. ---/
10775    
10776    /A(*PRUNE:A)B/K
10777        ACAB
10778     0: AB
10779    
10780    /(*MARK:A)(*PRUNE:B)(C|X)/K
10781        C
10782     0: C
10783     1: C
10784    MK: A
10785        D
10786    No match, mark = B
10787    
10788    /(*MARK:A)(*THEN:B)(C|X)/K
10789        C
10790     0: C
10791     1: C
10792    MK: A
10793        D
10794    No match, mark = B
10795    
10796    /--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
10797    
10798    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
10799        AAAC
10800    No match
10801    
10802    /--- Same --/
10803    
10804    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
10805        AAAC
10806    No match
10807    
10808    /--- This should fail; the SKIP advances by one, but when we get to AC, the
10809         PRUNE kills it. ---/
10810    
10811    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
10812        AAAC
10813    No match
10814    
10815    /A(*:A)A+(*SKIP)(B|Z) | AC/xK
10816        AAAC
10817    No match
10818    
10819    /--- This should fail, as a null name is the same as no name ---/
10820    
10821    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
10822        AAAC
10823    No match
10824    
10825    /--- This fails in PCRE, and I think that is in accordance with Perl's
10826         documentation, though in Perl it succeeds. ---/
10827    
10828    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
10829        AAAC
10830    No match
10831    
10832    /--- Mark names can be duplicated ---/
10833    
10834    /A(*:A)B|X(*:A)Y/K
10835        AABC
10836     0: AB
10837    MK: A
10838        XXYZ
10839     0: XY
10840    MK: A
10841    
10842    /^A(*:A)B|^X(*:A)Y/K
10843        ** Failers
10844    No match
10845        XAQQ
10846    No match, mark = A
10847    
10848    /--- A check on what happens after hitting a mark and them bumping along to
10849    something that does not even start. Perl reports tags after the failures here,
10850    though it does not when the individual letters are made into something
10851    more complicated. ---/
10852    
10853    /A(*:A)B|XX(*:B)Y/K
10854        AABC
10855     0: AB
10856    MK: A
10857        XXYZ
10858     0: XXY
10859    MK: B
10860        ** Failers
10861    No match
10862        XAQQ
10863    No match
10864        XAQQXZZ
10865    No match
10866        AXQQQ
10867    No match
10868        AXXQQQ
10869    No match
10870    
10871    /--- COMMIT at the start of a pattern should be the same as an anchor. Perl
10872    optimizations defeat this. So does the PCRE optimization unless we disable it
10873    with \Y. ---/
10874    
10875    /(*COMMIT)ABC/
10876        ABCDEFG
10877     0: ABC
10878        ** Failers
10879    No match
10880        DEFGABC\Y
10881    No match
10882    
10883    /--- Repeat some tests with added studying. ---/
10884    
10885    /A(*COMMIT)B/+KS
10886        ACABX
10887    No match
10888    
10889    /A(*THEN)B|A(*THEN)C/KS
10890        AC
10891     0: AC
10892    
10893    /A(*PRUNE)B|A(*PRUNE)C/KS
10894        AC
10895    No match
10896    
10897    /^(A(*THEN:A)B|C(*THEN:B)D)/KS
10898        AB
10899     0: AB
10900     1: AB
10901        CD
10902     0: CD
10903     1: CD
10904        ** Failers
10905    No match
10906        AC
10907    No match
10908        CB
10909    No match, mark = B
10910    
10911    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/KS
10912        AB
10913     0: AB
10914     1: AB
10915        CD
10916     0: CD
10917     1: CD
10918        ** Failers
10919    No match
10920        AC
10921    No match, mark = A
10922        CB
10923    No match, mark = B
10924    
10925    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/KS
10926        AB
10927     0: AB
10928     1: AB
10929        CD
10930     0: CD
10931     1: CD
10932    
10933    /A(*PRUNE:A)B/KS
10934        ACAB
10935     0: AB
10936    
10937    /(*MARK:A)(*PRUNE:B)(C|X)/KS
10938        C
10939     0: C
10940     1: C
10941    MK: A
10942        D
10943    No match
10944    
10945    /(*MARK:A)(*THEN:B)(C|X)/KS
10946        C
10947     0: C
10948     1: C
10949    MK: A
10950        D
10951    No match
10952    
10953    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS
10954        AAAC
10955    No match
10956    
10957    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xKS
10958        AAAC
10959    No match
10960    
10961    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xKS
10962        AAAC
10963    No match
10964    
10965    /A(*:A)A+(*SKIP)(B|Z) | AC/xKS
10966        AAAC
10967    No match
10968    
10969    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xKS
10970        AAAC
10971    No match
10972    
10973    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xKS
10974        AAAC
10975    No match
10976    
10977    /A(*:A)B|XX(*:B)Y/KS
10978        AABC
10979     0: AB
10980    MK: A
10981        XXYZ
10982     0: XXY
10983    MK: B
10984        ** Failers
10985    No match
10986        XAQQ
10987    No match
10988        XAQQXZZ
10989    No match
10990        AXQQQ
10991    No match
10992        AXXQQQ
10993    No match
10994    
10995    /(*COMMIT)ABC/
10996        ABCDEFG
10997     0: ABC
10998        ** Failers
10999    No match
11000        DEFGABC\Y
11001    No match
11002    
11003    /^(ab (c+(*THEN)cd) | xyz)/x
11004        abcccd
11005    No match
11006    
11007    /^(ab (c+(*PRUNE)cd) | xyz)/x
11008        abcccd
11009    No match
11010    
11011    /^(ab (c+(*FAIL)cd) | xyz)/x
11012        abcccd
11013    No match
11014    
11015    /--- Perl 5.11 gets some of these wrong ---/
11016    
11017    /(?>.(*ACCEPT))*?5/
11018        abcde
11019     0: a
11020    
11021    /(.(*ACCEPT))*?5/
11022        abcde
11023     0: a
11024     1: a
11025    
11026    /(.(*ACCEPT))5/
11027        abcde
11028     0: a
11029     1: a
11030    
11031    /(.(*ACCEPT))*5/
11032        abcde
11033     0: a
11034     1: a
11035    
11036    /A\NB./BZ
11037    ------------------------------------------------------------------
11038            Bra
11039            A
11040            Any
11041            B
11042            Any
11043            Ket
11044            End
11045    ------------------------------------------------------------------
11046      ACBD
11047     0: ACBD
11048      ** Failers
11049    No match
11050      A\nB
11051    No match
11052      ACB\n
11053    No match
11054    
11055    /A\NB./sBZ
11056    ------------------------------------------------------------------
11057            Bra
11058            A
11059            Any
11060            B
11061            AllAny
11062            Ket
11063            End
11064    ------------------------------------------------------------------
11065      ACBD
11066     0: ACBD
11067      ACB\n
11068     0: ACB\x0a
11069      ** Failers
11070    No match
11071      A\nB
11072    No match
11073    
11074    /A\NB/<crlf>
11075      A\nB
11076     0: A\x0aB
11077      A\rB
11078     0: A\x0dB
11079      ** Failers
11080    No match
11081      A\r\nB
11082    No match
11083    
11084  /-- End of testinput2 --/  /-- End of testinput2 --/

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

  ViewVC Help
Powered by ViewVC 1.1.5