/[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 471 by ph10, Fri Dec 11 15:11:55 2009 UTC revision 510 by ph10, Sat Mar 27 17:45:29 2010 UTC
# Line 857  No match Line 857  No match
857      a      a
858  No match  No match
859    
860  /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
861  Capturing subpattern count = 0  Capturing subpattern count = 0
862  No options  No options
863  First char = 'T'  First char = 'T'
# Line 869  Max back reference = 1 Line 869  Max back reference = 1
869  Options: anchored  Options: anchored
870  No first char  No first char
871  No need char  No need char
872        aaaa
873    No match
874      aaaaaa      aaaaaa
875   0: aaaaaa  No match
876   1: aa  
877    /Perl does not fail these two for the final subjects. Neither did PCRE until/
878    /release 8.01. The problem is in backtracking into a subpattern that contains/
879    No match
880    /a recursive reference to itself. PCRE has now made these into atomic patterns./
881    No match
882    
883    /^(xa|=?\1a){2}$/
884        xa=xaa
885     0: xa=xaa
886     1: =xaa
887        ** Failers
888    No match
889        xa=xaaa
890    No match
891    
892    /^(xa|=?\1a)+$/
893        xa=xaa
894     0: xa=xaa
895     1: =xaa
896        ** Failers
897    No match
898        xa=xaaa
899    No match
900    
901  /These are syntax tests from Perl 5.005/I  /These are syntax tests from Perl 5.005/I
902  Capturing subpattern count = 0  Capturing subpattern count = 0
# Line 8642  No match Line 8667  No match
8667  +13   ^  ^      (*FAIL)  +13   ^  ^      (*FAIL)
8668  No match  No match
8669    
 /a(*PRUNE:XXX)b/  
 Failed: (*VERB) with an argument is not supported at offset 8  
   
8670  /a(*MARK)b/  /a(*MARK)b/
8671  Failed: (*VERB) not recognized at offset 7  Failed: (*MARK) must have an argument at offset 7
8672    
8673  /(?i:A{1,}\6666666666)/  /(?i:A{1,}\6666666666)/
8674  Failed: number is too big at offset 19  Failed: number is too big at offset 19
# Line 10486  Starting byte set: i Line 10508  Starting byte set: i
10508   0: ia   0: ia
10509   1:   1:
10510    
10511    /(?i)a(?-i)b|c/BZ
10512    ------------------------------------------------------------------
10513            Bra
10514         NC a
10515         00 Opt
10516            b
10517            Alt
10518         00 Opt
10519            c
10520            Ket
10521            End
10522    ------------------------------------------------------------------
10523        XabX
10524     0: ab
10525        XAbX
10526     0: Ab
10527        CcC
10528     0: c
10529        ** Failers
10530    No match
10531        XABX
10532    No match
10533    
10534    /(?i)a(?s)b|c/BZ
10535    ------------------------------------------------------------------
10536            Bra
10537         NC a
10538         05 Opt
10539         NC b
10540            Alt
10541         05 Opt
10542         NC c
10543            Ket
10544            End
10545    ------------------------------------------------------------------
10546    
10547    /(?i)a(?s-i)b|c/BZ
10548    ------------------------------------------------------------------
10549            Bra
10550         NC a
10551         04 Opt
10552            b
10553            Alt
10554         04 Opt
10555            c
10556            Ket
10557            End
10558    ------------------------------------------------------------------
10559    
10560    /^(ab(c\1)d|x){2}$/BZ
10561    ------------------------------------------------------------------
10562            Bra
10563            ^
10564            Once
10565            CBra 1
10566            ab
10567            CBra 2
10568            c
10569            \1
10570            Ket
10571            d
10572            Alt
10573            x
10574            Ket
10575            Ket
10576            Once
10577            CBra 1
10578            ab
10579            CBra 2
10580            c
10581            \1
10582            Ket
10583            d
10584            Alt
10585            x
10586            Ket
10587            Ket
10588            $
10589            Ket
10590            End
10591    ------------------------------------------------------------------
10592        xabcxd
10593     0: xabcxd
10594     1: abcxd
10595     2: cx
10596    
10597    /^(?&t)*+(?(DEFINE)(?<t>.))$/BZ
10598    ------------------------------------------------------------------
10599            Bra
10600            ^
10601            Once
10602            Brazero
10603            Once
10604            Recurse
10605            KetRmax
10606            Ket
10607            Cond
10608            Cond def
10609            CBra 1
10610            Any
10611            Ket
10612            Ket
10613            $
10614            Ket
10615            End
10616    ------------------------------------------------------------------
10617    
10618    /^(?&t)*(?(DEFINE)(?<t>.))$/BZ
10619    ------------------------------------------------------------------
10620            Bra
10621            ^
10622            Brazero
10623            Once
10624            Recurse
10625            KetRmax
10626            Cond
10627            Cond def
10628            CBra 1
10629            Any
10630            Ket
10631            Ket
10632            $
10633            Ket
10634            End
10635    ------------------------------------------------------------------
10636    
10637    / -- The first four of these are not in the Perl 5.10 test because Perl
10638         documents that the use of \K in assertions is "not well defined". The
10639         last is here because Perl gives the match as "b" rather than "ab". I
10640         believe this to be a Perl bug. --/
10641    
10642    /(?=a\Kb)ab/
10643        ab
10644     0: b
10645    
10646    /(?!a\Kb)ac/
10647        ac
10648     0: ac
10649    
10650    /^abc(?<=b\Kc)d/
10651        abcd
10652     0: cd
10653    
10654    /^abc(?<!b\Kq)d/
10655        abcd
10656     0: abcd
10657    
10658    /(?>a\Kb)z|(ab)/
10659        ab
10660     0: ab
10661     1: ab
10662    
10663    /----------------------/
10664    
10665    /(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/
10666    Failed: recursive call could loop indefinitely at offset 31
10667    
10668    /abc(*MARK:)pqr/
10669    Failed: (*MARK) must have an argument at offset 10
10670    
10671    /abc(*:)pqr/
10672    Failed: (*MARK) must have an argument at offset 6
10673    
10674    /abc(*FAIL:123)xyz/
10675    Failed: an argument is not allowed for (*ACCEPT), (*FAIL), or (*COMMIT) at offset 13
10676    
10677    /--- This should, and does, fail. In Perl, it does not, which I think is a
10678         bug because replacing the B in the pattern by (B|D) does make it fail. ---/
10679    
10680    /A(*COMMIT)B/+K
10681        ACABX
10682    No match
10683    
10684    /--- These should be different, but in Perl 5.11 are not, which I think
10685         is a bug in Perl. ---/
10686    
10687    /A(*THEN)B|A(*THEN)C/K
10688        AC
10689     0: AC
10690    
10691    /A(*PRUNE)B|A(*PRUNE)C/K
10692        AC
10693    No match
10694    
10695    /--- A whole lot of tests of verbs with arguments are here rather than in test
10696         11 because Perl doesn't seem to follow its specification entirely
10697         correctly. ---/
10698    
10699    /--- Perl 5.11 sets $REGERROR on the AC failure case here; PCRE does not. It is
10700         not clear how Perl defines "involved in the failure of the match". ---/
10701    
10702    /^(A(*THEN:A)B|C(*THEN:B)D)/K
10703        AB
10704     0: AB
10705     1: AB
10706        CD
10707     0: CD
10708     1: CD
10709        ** Failers
10710    No match
10711        AC
10712    No match
10713        CB
10714    No match, mark = B
10715    
10716    /--- Check the use of names for success and failure. PCRE doesn't show these
10717    names for success, though Perl does, contrary to its spec. ---/
10718    
10719    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
10720        AB
10721     0: AB
10722     1: AB
10723        CD
10724     0: CD
10725     1: CD
10726        ** Failers
10727    No match
10728        AC
10729    No match, mark = A
10730        CB
10731    No match, mark = B
10732    
10733    /--- An empty name does not pass back an empty string. It is the same as if no
10734    name were given. ---/
10735    
10736    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/K
10737        AB
10738     0: AB
10739     1: AB
10740        CD
10741     0: CD
10742     1: CD
10743    
10744    /--- PRUNE goes to next bumpalong; COMMIT does not. ---/
10745    
10746    /A(*PRUNE:A)B/K
10747        ACAB
10748     0: AB
10749    
10750    /(*MARK:A)(*PRUNE:B)(C|X)/K
10751        C
10752     0: C
10753     1: C
10754    MK: A
10755        D
10756    No match, mark = B
10757    
10758    /(*MARK:A)(*THEN:B)(C|X)/K
10759        C
10760     0: C
10761     1: C
10762    MK: A
10763        D
10764    No match, mark = B
10765    
10766    /--- This should fail, as the skip causes a bump to offset 3 (the skip) ---/
10767    
10768    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xK
10769        AAAC
10770    No match
10771    
10772    /--- Same --/
10773    
10774    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xK
10775        AAAC
10776    No match
10777    
10778    /--- This should fail; the SKIP advances by one, but when we get to AC, the
10779         PRUNE kills it. ---/
10780    
10781    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xK
10782        AAAC
10783    No match
10784    
10785    /A(*:A)A+(*SKIP)(B|Z) | AC/xK
10786        AAAC
10787    No match
10788    
10789    /--- This should fail, as a null name is the same as no name ---/
10790    
10791    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xK
10792        AAAC
10793    No match
10794    
10795    /--- This fails in PCRE, and I think that is in accordance with Perl's
10796         documentation, though in Perl it succeeds. ---/
10797    
10798    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xK
10799        AAAC
10800    No match
10801    
10802    /--- Mark names can be duplicated ---/
10803    
10804    /A(*:A)B|X(*:A)Y/K
10805        AABC
10806     0: AB
10807    MK: A
10808        XXYZ
10809     0: XY
10810    MK: A
10811    
10812    /^A(*:A)B|^X(*:A)Y/K
10813        ** Failers
10814    No match
10815        XAQQ
10816    No match, mark = A
10817    
10818    /--- A check on what happens after hitting a mark and them bumping along to
10819    something that does not even start. Perl reports tags after the failures here,
10820    though it does not when the individual letters are made into something
10821    more complicated. ---/
10822    
10823    /A(*:A)B|XX(*:B)Y/K
10824        AABC
10825     0: AB
10826    MK: A
10827        XXYZ
10828     0: XXY
10829    MK: B
10830        ** Failers
10831    No match
10832        XAQQ
10833    No match
10834        XAQQXZZ
10835    No match
10836        AXQQQ
10837    No match
10838        AXXQQQ
10839    No match
10840    
10841    /--- COMMIT at the start of a pattern should be the same as an anchor. Perl
10842    optimizations defeat this. So does the PCRE optimization unless we disable it
10843    with \Y. ---/
10844    
10845    /(*COMMIT)ABC/
10846        ABCDEFG
10847     0: ABC
10848        ** Failers
10849    No match
10850        DEFGABC\Y
10851    No match
10852    
10853    /--- Repeat some tests with added studying. ---/
10854    
10855    /A(*COMMIT)B/+KS
10856        ACABX
10857    No match
10858    
10859    /A(*THEN)B|A(*THEN)C/KS
10860        AC
10861     0: AC
10862    
10863    /A(*PRUNE)B|A(*PRUNE)C/KS
10864        AC
10865    No match
10866    
10867    /^(A(*THEN:A)B|C(*THEN:B)D)/KS
10868        AB
10869     0: AB
10870     1: AB
10871        CD
10872     0: CD
10873     1: CD
10874        ** Failers
10875    No match
10876        AC
10877    No match
10878        CB
10879    No match, mark = B
10880    
10881    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/KS
10882        AB
10883     0: AB
10884     1: AB
10885        CD
10886     0: CD
10887     1: CD
10888        ** Failers
10889    No match
10890        AC
10891    No match, mark = A
10892        CB
10893    No match, mark = B
10894    
10895    /^(A(*PRUNE:)B|C(*PRUNE:B)D)/KS
10896        AB
10897     0: AB
10898     1: AB
10899        CD
10900     0: CD
10901     1: CD
10902    
10903    /A(*PRUNE:A)B/KS
10904        ACAB
10905     0: AB
10906    
10907    /(*MARK:A)(*PRUNE:B)(C|X)/KS
10908        C
10909     0: C
10910     1: C
10911    MK: A
10912        D
10913    No match
10914    
10915    /(*MARK:A)(*THEN:B)(C|X)/KS
10916        C
10917     0: C
10918     1: C
10919    MK: A
10920        D
10921    No match
10922    
10923    /A(*MARK:A)A+(*SKIP)(B|Z) | AC/xKS
10924        AAAC
10925    No match
10926    
10927    /A(*MARK:A)A+(*MARK:B)(*SKIP:B)(B|Z) | AC/xKS
10928        AAAC
10929    No match
10930    
10931    /A(*PRUNE:A)A+(*SKIP:A)(B|Z) | AC/xKS
10932        AAAC
10933    No match
10934    
10935    /A(*:A)A+(*SKIP)(B|Z) | AC/xKS
10936        AAAC
10937    No match
10938    
10939    /A(*MARK:A)A+(*SKIP:)(B|Z) | AC/xKS
10940        AAAC
10941    No match
10942    
10943    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AAC/xKS
10944        AAAC
10945    No match
10946    
10947    /A(*:A)B|XX(*:B)Y/KS
10948        AABC
10949     0: AB
10950    MK: A
10951        XXYZ
10952     0: XXY
10953    MK: B
10954        ** Failers
10955    No match
10956        XAQQ
10957    No match
10958        XAQQXZZ
10959    No match
10960        AXQQQ
10961    No match
10962        AXXQQQ
10963    No match
10964    
10965    /(*COMMIT)ABC/
10966        ABCDEFG
10967     0: ABC
10968        ** Failers
10969    No match
10970        DEFGABC\Y
10971    No match
10972    
10973    /^(ab (c+(*THEN)cd) | xyz)/x
10974        abcccd
10975    No match
10976    
10977    /^(ab (c+(*PRUNE)cd) | xyz)/x
10978        abcccd
10979    No match
10980    
10981    /^(ab (c+(*FAIL)cd) | xyz)/x
10982        abcccd
10983    No match
10984    
10985  /-- End of testinput2 --/  /-- End of testinput2 --/

Legend:
Removed from v.471  
changed lines
  Added in v.510

  ViewVC Help
Powered by ViewVC 1.1.5