/[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 574 by ph10, Sat Nov 20 17:47:27 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 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 8760  No match Line 8787  No match
8787  No match  No match
8788      a\x85b      a\x85b
8789  No match  No match
8790    
8791    /(*ANY).*/g
8792        abc\r\ndef
8793     0: abc
8794     0:
8795     0: def
8796     0:
8797    
8798    /(*ANYCRLF).*/g
8799        abc\r\ndef
8800     0: abc
8801     0:
8802     0: def
8803     0:
8804    
8805    /(*CRLF).*/g
8806        abc\r\ndef
8807     0: abc
8808     0:
8809     0: def
8810     0:
8811    
8812  /a\Rb/I<bsr_anycrlf>  /a\Rb/I<bsr_anycrlf>
8813  Capturing subpattern count = 0  Capturing subpattern count = 0
# Line 10432  Partial match: abca Line 10480  Partial match: abca
10480      xxxxabcde\P\P      xxxxabcde\P\P
10481  Partial match: abcde  Partial match: abcde
10482    
10483  /-- This is not in the Perl 5.10 test because Perl seems currently to be broken  /-- This is not in the Perl >= 5.10 test because Perl seems currently to be
10484      and not behaving as specified in that it *does* bumpalong after hitting      broken and not behaving as specified in that it *does* bumpalong after
10485      (*COMMIT). --/      hitting (*COMMIT). --/
10486    
10487  /(?1)(A(*COMMIT)|B)D/  /(?1)(A(*COMMIT)|B)D/
10488      ABD      ABD
# Line 10637  No match Line 10685  No match
10685          End          End
10686  ------------------------------------------------------------------  ------------------------------------------------------------------
10687    
10688  / -- The first four of these are not in the Perl 5.10 test because Perl  / -- The first four of these are not in the Perl >= 5.10 test because Perl
10689       documents that the use of \K in assertions is "not well defined". The       documents that the use of \K in assertions is "not well defined". The
10690       last is here because Perl gives the match as "b" rather than "ab". I       last is here because Perl gives the match as "b" rather than "ab". I
10691       believe this to be a Perl bug. --/       believe this to be a Perl bug. --/
# Line 10665  No match Line 10713  No match
10713    
10714  /----------------------/  /----------------------/
10715    
10716    /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
10717    Failed: recursive call could loop indefinitely at offset 31
10718    
10719    /abc(*MARK:)pqr/
10720    Failed: (*MARK) must have an argument at offset 10
10721    
10722    /abc(*:)pqr/
10723    Failed: (*MARK) must have an argument at offset 6
10724    
10725    /abc(*FAIL:123)xyz/
10726    Failed: an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) at offset 13
10727    
10728    /--- This should, and does, fail. In Perl, it does not, which I think is a
10729         bug because replacing the B in the pattern by (B|D) does make it fail. ---/
10730    
10731    /A(*COMMIT)B/+K
10732        ACABX
10733    No match
10734    
10735    /--- These should be different, but in Perl 5.11 are not, which I think
10736         is a bug in Perl. ---/
10737    
10738    /A(*THEN)B|A(*THEN)C/K
10739        AC
10740     0: AC
10741    
10742    /A(*PRUNE)B|A(*PRUNE)C/K
10743        AC
10744    No match
10745    
10746    /--- A whole lot of tests of verbs with arguments are here rather than in test
10747         11 because Perl doesn't seem to follow its specification entirely
10748         correctly. ---/
10749    
10750    /--- Perl 5.11 sets $REGERROR on the AC failure case here; PCRE does not. It is
10751         not clear how Perl defines "involved in the failure of the match". ---/
10752    
10753    /^(A(*THEN:A)B|C(*THEN:B)D)/K
10754        AB
10755     0: AB
10756     1: AB
10757        CD
10758     0: CD
10759     1: CD
10760        ** Failers
10761    No match
10762        AC
10763    No match
10764        CB
10765    No match, mark = B
10766    
10767    /--- Check the use of names for success and failure. PCRE doesn't show these
10768    names for success, though Perl does, contrary to its spec. ---/
10769    
10770    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
10771        AB
10772     0: AB
10773     1: AB
10774        CD
10775     0: CD
10776     1: CD
10777        ** Failers
10778    No match
10779        AC
10780    No match, mark = A
10781        CB
10782    No match, mark = B
10783    
10784    /--- An empty name does not pass back an empty string. It is the same as if no
10785    name were given. ---/
10786    
10787    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
10788        AB
10789     0: AB
10790     1: AB
10791        CD
10792     0: CD
10793     1: CD
10794    
10795    /--- PRUNE goes to next bumpalong; COMMIT does not. ---/
10796    
10797    /A(*PRUNE:A)B/K
10798        ACAB
10799     0: AB
10800    
10801    /(*MARK:A)(*PRUNE:B)(C|X)/K
10802        C
10803     0: C
10804     1: C
10805    MK: A
10806        D
10807    No match, mark = B
10808    
10809    /(*MARK:A)(*THEN:B)(C|X)/K
10810        C
10811     0: C
10812     1: C
10813    MK: A
10814        D
10815    No match, mark = B
10816    
10817    /--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
10818    
10819    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
10820        AAAC
10821    No match
10822    
10823    /--- Same --/
10824    
10825    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
10826        AAAC
10827    No match
10828    
10829    /--- This should fail; the SKIP advances by one, but when we get to AC, the
10830         PRUNE kills it. ---/
10831    
10832    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
10833        AAAC
10834    No match
10835    
10836    /A(*:A)A+(*SKIP)(B|Z) | AC/xK
10837        AAAC
10838    No match
10839    
10840    /--- This should fail, as a null name is the same as no name ---/
10841    
10842    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
10843        AAAC
10844    No match
10845    
10846    /--- This fails in PCRE, and I think that is in accordance with Perl's
10847         documentation, though in Perl it succeeds. ---/
10848    
10849    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
10850        AAAC
10851    No match
10852    
10853    /--- Mark names can be duplicated ---/
10854    
10855    /A(*:A)B|X(*:A)Y/K
10856        AABC
10857     0: AB
10858    MK: A
10859        XXYZ
10860     0: XY
10861    MK: A
10862    
10863    /^A(*:A)B|^X(*:A)Y/K
10864        ** Failers
10865    No match
10866        XAQQ
10867    No match, mark = A
10868    
10869    /--- A check on what happens after hitting a mark and them bumping along to
10870    something that does not even start. Perl reports tags after the failures here,
10871    though it does not when the individual letters are made into something
10872    more complicated. ---/
10873    
10874    /A(*:A)B|XX(*:B)Y/K
10875        AABC
10876     0: AB
10877    MK: A
10878        XXYZ
10879     0: XXY
10880    MK: B
10881        ** Failers
10882    No match
10883        XAQQ
10884    No match
10885        XAQQXZZ
10886    No match
10887        AXQQQ
10888    No match
10889        AXXQQQ
10890    No match
10891    
10892    /--- COMMIT at the start of a pattern should be the same as an anchor. Perl
10893    optimizations defeat this. So does the PCRE optimization unless we disable it
10894    with \Y. ---/
10895    
10896    /(*COMMIT)ABC/
10897        ABCDEFG
10898     0: ABC
10899        ** Failers
10900    No match
10901        DEFGABC\Y
10902    No match
10903    
10904    /--- Repeat some tests with added studying. ---/
10905    
10906    /A(*COMMIT)B/+KS
10907        ACABX
10908    No match
10909    
10910    /A(*THEN)B|A(*THEN)C/KS
10911        AC
10912     0: AC
10913    
10914    /A(*PRUNE)B|A(*PRUNE)C/KS
10915        AC
10916    No match
10917    
10918    /^(A(*THEN:A)B|C(*THEN:B)D)/KS
10919        AB
10920     0: AB
10921     1: AB
10922        CD
10923     0: CD
10924     1: CD
10925        ** Failers
10926    No match
10927        AC
10928    No match
10929        CB
10930    No match, mark = B
10931    
10932    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/KS
10933        AB
10934     0: AB
10935     1: AB
10936        CD
10937     0: CD
10938     1: CD
10939        ** Failers
10940    No match
10941        AC
10942    No match, mark = A
10943        CB
10944    No match, mark = B
10945    
10946    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/KS
10947        AB
10948     0: AB
10949     1: AB
10950        CD
10951     0: CD
10952     1: CD
10953    
10954    /A(*PRUNE:A)B/KS
10955        ACAB
10956     0: AB
10957    
10958    /(*MARK:A)(*PRUNE:B)(C|X)/KS
10959        C
10960     0: C
10961     1: C
10962    MK: A
10963        D
10964    No match
10965    
10966    /(*MARK:A)(*THEN:B)(C|X)/KS
10967        C
10968     0: C
10969     1: C
10970    MK: A
10971        D
10972    No match
10973    
10974    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS
10975        AAAC
10976    No match
10977    
10978    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xKS
10979        AAAC
10980    No match
10981    
10982    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xKS
10983        AAAC
10984    No match
10985    
10986    /A(*:A)A+(*SKIP)(B|Z) | AC/xKS
10987        AAAC
10988    No match
10989    
10990    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xKS
10991        AAAC
10992    No match
10993    
10994    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xKS
10995        AAAC
10996    No match
10997    
10998    /A(*:A)B|XX(*:B)Y/KS
10999        AABC
11000     0: AB
11001    MK: A
11002        XXYZ
11003     0: XXY
11004    MK: B
11005        ** Failers
11006    No match
11007        XAQQ
11008    No match
11009        XAQQXZZ
11010    No match
11011        AXQQQ
11012    No match
11013        AXXQQQ
11014    No match
11015    
11016    /(*COMMIT)ABC/
11017        ABCDEFG
11018     0: ABC
11019        ** Failers
11020    No match
11021        DEFGABC\Y
11022    No match
11023    
11024    /^(ab (c+(*THEN)cd) | xyz)/x
11025        abcccd
11026    No match
11027    
11028    /^(ab (c+(*PRUNE)cd) | xyz)/x
11029        abcccd
11030    No match
11031    
11032    /^(ab (c+(*FAIL)cd) | xyz)/x
11033        abcccd
11034    No match
11035    
11036    /--- Perl 5.11 gets some of these wrong ---/
11037    
11038    /(?>.(*ACCEPT))*?5/
11039        abcde
11040     0: a
11041    
11042    /(.(*ACCEPT))*?5/
11043        abcde
11044     0: a
11045     1: a
11046    
11047    /(.(*ACCEPT))5/
11048        abcde
11049     0: a
11050     1: a
11051    
11052    /(.(*ACCEPT))*5/
11053        abcde
11054     0: a
11055     1: a
11056    
11057    /A\NB./BZ
11058    ------------------------------------------------------------------
11059            Bra
11060            A
11061            Any
11062            B
11063            Any
11064            Ket
11065            End
11066    ------------------------------------------------------------------
11067        ACBD
11068     0: ACBD
11069        *** Failers
11070    No match
11071        A\nB
11072    No match
11073        ACB\n
11074    No match
11075    
11076    /A\NB./sBZ
11077    ------------------------------------------------------------------
11078            Bra
11079            A
11080            Any
11081            B
11082            AllAny
11083            Ket
11084            End
11085    ------------------------------------------------------------------
11086        ACBD
11087     0: ACBD
11088        ACB\n
11089     0: ACB\x0a
11090        *** Failers
11091    No match
11092        A\nB
11093    No match
11094    
11095    /A\NB/<crlf>
11096        A\nB
11097     0: A\x0aB
11098        A\rB
11099     0: A\x0dB
11100        ** Failers
11101    No match
11102        A\r\nB
11103    No match
11104    
11105    /\R+b/BZ
11106    ------------------------------------------------------------------
11107            Bra
11108            \R++
11109            b
11110            Ket
11111            End
11112    ------------------------------------------------------------------
11113    
11114    /\R+\n/BZ
11115    ------------------------------------------------------------------
11116            Bra
11117            \R+
11118            \x0a
11119            Ket
11120            End
11121    ------------------------------------------------------------------
11122    
11123    /\R+\d/BZ
11124    ------------------------------------------------------------------
11125            Bra
11126            \R++
11127            \d
11128            Ket
11129            End
11130    ------------------------------------------------------------------
11131    
11132    /\d*\R/BZ
11133    ------------------------------------------------------------------
11134            Bra
11135            \d*+
11136            \R
11137            Ket
11138            End
11139    ------------------------------------------------------------------
11140    
11141    /\s*\R/BZ
11142    ------------------------------------------------------------------
11143            Bra
11144            \s*+
11145            \R
11146            Ket
11147            End
11148    ------------------------------------------------------------------
11149    
11150    /-- Perl treats this one differently, not failing the second string. I believe
11151        that is a bug in Perl. --/
11152    
11153    /^((abc|abcx)(*THEN)y|abcd)/
11154        abcd
11155     0: abcd
11156     1: abcd
11157        *** Failers
11158    No match
11159        abcxy
11160    No match
11161    
11162    /(?<=abc)def/
11163        abc\P\P
11164    Partial match: abc
11165    
11166    /abc$/
11167        abc
11168     0: abc
11169        abc\P
11170     0: abc
11171        abc\P\P
11172    Partial match: abc
11173    
11174    /abc$/m
11175        abc
11176     0: abc
11177        abc\n
11178     0: abc
11179        abc\P\P
11180    Partial match: abc
11181        abc\n\P\P
11182     0: abc
11183        abc\P
11184     0: abc
11185        abc\n\P
11186     0: abc
11187    
11188    /abc\z/
11189        abc
11190     0: abc
11191        abc\P
11192     0: abc
11193        abc\P\P
11194    Partial match: abc
11195    
11196    /abc\Z/
11197        abc
11198     0: abc
11199        abc\P
11200     0: abc
11201        abc\P\P
11202    Partial match: abc
11203    
11204    /abc\b/
11205        abc
11206     0: abc
11207        abc\P
11208     0: abc
11209        abc\P\P
11210    Partial match: abc
11211    
11212    /abc\B/
11213        abc
11214    No match
11215        abc\P
11216    Partial match: abc
11217        abc\P\P
11218    Partial match: abc
11219    
11220    /.+/
11221        abc\>0
11222     0: abc
11223        abc\>1
11224     0: bc
11225        abc\>2
11226     0: c
11227        abc\>3
11228    No match
11229        abc\>4
11230    Error -24
11231        abc\>-4
11232    Error -24
11233    
11234    /^\cģ/
11235    Failed: \c must be followed by an ASCII character at offset 3
11236    
11237  /-- End of testinput2 --/  /-- End of testinput2 --/

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

  ViewVC Help
Powered by ViewVC 1.1.5