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

Diff of /code/trunk/testdata/testoutput11

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

revision 464 by ph10, Sun Oct 18 19:50:34 2009 UTC revision 544 by ph10, Tue Jun 15 17:20:55 2010 UTC
# Line 712  No match Line 712  No match
712   1: (ab(cd)ef)   1: (ab(cd)ef)
713   2: ef   2: ef
714    
715    /^(?!a(*SKIP)b)/
716        ac
717     0:
718    
719    /^(?=a(*SKIP)b|ac)/
720        ** Failers
721    No match
722        ac
723    No match
724    
725    /^(?=a(*THEN)b|ac)/
726        ac
727     0:
728    
729    /^(?=a(*PRUNE)b)/
730        ab
731     0:
732        ** Failers
733    No match
734        ac
735    No match
736    
737    /^(?=a(*ACCEPT)b)/
738        ac
739     0:
740    
741    /^(?(?!a(*SKIP)b))/
742        ac
743     0:
744    
745    /(?>a\Kb)/
746        ab
747     0: b
748    
749    /((?>a\Kb))/
750        ab
751     0: b
752     1: ab
753    
754    /(a\Kb)/
755        ab
756     0: b
757     1: ab
758    
759    /^a\Kcz|ac/
760        ac
761     0: ac
762    
763    /(?>a\Kbz|ab)/
764        ab
765     0: ab
766    
767    /^(?&t)(?(DEFINE)(?<t>a\Kb))$/
768        ab
769     0: b
770    
771    /^([^()]|\((?1)*\))*$/
772        a(b)c
773     0: a(b)c
774     1: c
775        a(b(c)d)e
776     0: a(b(c)d)e
777     1: e
778    
779    /(?P<L1>(?P<L2>0)(?P>L1)|(?P>L2))/
780        0
781     0: 0
782     1: 0
783        00
784     0: 00
785     1: 00
786     2: 0
787        0000
788     0: 0000
789     1: 0000
790     2: 0
791    
792    /(?P<L1>(?P<L2>0)|(?P>L2)(?P>L1))/
793        0
794     0: 0
795     1: 0
796     2: 0
797        00
798     0: 0
799     1: 0
800     2: 0
801        0000
802     0: 0
803     1: 0
804     2: 0
805    
806    /--- This one does fail, as expected, in Perl. It needs the complex item at the
807         end of the pattern. A single letter instead of (B|D) makes it not fail,
808         which I think is a Perl bug. --- /
809    
810    /A(*COMMIT)(B|D)/
811        ACABX
812    No match
813    
814    /--- Check the use of names for failure ---/
815    
816    /^(A(*PRUNE:A)B|C(*PRUNE:B)D)/K
817        ** Failers
818    No match
819        AC
820    No match, mark = A
821        CB
822    No match, mark = B
823    
824    /(*MARK:A)(*SKIP:B)(C|X)/K
825        C
826     0: C
827     1: C
828    MK: A
829        D
830    No match, mark = A
831    
832    /^(A(*THEN:A)B|C(*THEN:B)D)/K
833        ** Failers
834    No match
835        CB
836    No match, mark = B
837    
838    /^(?:A(*THEN:A)B|C(*THEN:B)D)/K
839        CB
840    No match, mark = B
841    
842    /^(?>A(*THEN:A)B|C(*THEN:B)D)/K
843        CB
844    No match, mark = B
845    
846    /--- This should succeed, as the skip causes bump to offset 1 (the mark). Note
847    that we have to have something complicated such as (B|Z) at the end because,
848    for Perl, a simple character somehow causes an unwanted optimization to mess
849    with the handling of backtracking verbs. ---/
850    
851    /A(*MARK:A)A+(*SKIP:A)(B|Z) | AC/xK
852        AAAC
853     0: AC
854    
855    /--- Test skipping over a non-matching mark. ---/
856    
857    /A(*MARK:A)A+(*MARK:B)(*SKIP:A)(B|Z) | AC/xK
858        AAAC
859     0: AC
860    
861    /--- Check shorthand for MARK ---/
862    
863    /A(*:A)A+(*SKIP:A)(B|Z) | AC/xK
864        AAAC
865     0: AC
866    
867    /--- Don't loop! ---/
868    
869    /(*:A)A+(*SKIP:A)(B|Z)/K
870        AAAC
871    No match, mark = A
872    
873    /--- This should succeed, as a non-existent skip name disables the skip ---/
874    
875    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC/xK
876        AAAC
877     0: AC
878    
879    /A(*MARK:A)A+(*SKIP:B)(B|Z) | AC(*:B)/xK
880        AAAC
881     0: AC
882    MK: B
883    
884    /--- We use something more complicated than individual letters here, because
885    that causes different behaviour in Perl. Perhaps it disables some optimization;
886    anyway, the result now matches PCRE in that no tag is passed back for the
887    failures. ---/
888    
889    /(A|P)(*:A)(B|P) | (X|P)(X|P)(*:B)(Y|P)/xK
890        AABC
891     0: AB
892     1: A
893     2: B
894    MK: A
895        XXYZ
896     0: XXY
897     1: <unset>
898     2: <unset>
899     3: X
900     4: X
901     5: Y
902    MK: B
903        ** Failers
904    No match
905        XAQQ
906    No match
907        XAQQXZZ
908    No match
909        AXQQQ
910    No match
911        AXXQQQ
912    No match
913    
914    /--- COMMIT at the start of a pattern should act like an anchor. Again,
915    however, we need the complication for Perl. ---/
916    
917    /(*COMMIT)(A|P)(B|P)(C|P)/
918        ABCDEFG
919     0: ABC
920     1: A
921     2: B
922     3: C
923        ** Failers
924    No match
925        DEFGABC
926    No match
927    
928    /--- COMMIT inside an atomic group can't stop backtracking over the group. ---/
929    
930    /(\w+)(?>b(*COMMIT))\w{2}/
931        abbb
932     0: abbb
933     1: a
934    
935    /(\w+)b(*COMMIT)\w{2}/
936        abbb
937    No match
938    
939    /--- Check opening parens in comment when seeking forward reference. ---/
940    
941    /(?&t)(?#()(?(DEFINE)(?<t>a))/
942        bac
943     0: a
944    
945  /-- End of testinput11 --/  /-- End of testinput11 --/

Legend:
Removed from v.464  
changed lines
  Added in v.544

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12