From: Bram Date: Mon, 16 Feb 2009 10:22:40 +0000 (+0100) Subject: Extra regex tests X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e120390b47b92e593603cc4ff24ccd2b882000d6;p=p5sagit%2Fp5-mst-13.2.git Extra regex tests Message-ID: <20090215185207.gsnhhqdegckws0co@horde.wizbit.be> Message-ID: <20090215210634.u02f15b284ogc4s4@horde.wizbit.be> --- diff --git a/t/op/pat.t b/t/op/pat.t index eb1034a..859ec00 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -13,7 +13,7 @@ sub run_tests; $| = 1; -my $EXPECTED_TESTS = 3962; # Update this when adding/deleting tests. +my $EXPECTED_TESTS = 3965; # Update this when adding/deleting tests. BEGIN { chdir 't' if -d 't'; @@ -4116,6 +4116,13 @@ sub run_tests { } iseq "@res","#1 #2"; } + { + no warnings 'closure'; + my $re = qr/A(??{"1"})/; + ok "A1B" =~ m/^((??{ $re }))((??{"B"}))$/; + ok $1 eq "A1"; + ok $2 eq "B"; + } # # This should be the last test. # diff --git a/t/op/re_tests b/t/op/re_tests index 9d353e8..f9b070d 100644 --- a/t/op/re_tests +++ b/t/op/re_tests @@ -1365,3 +1365,5 @@ foo(\h)bar foo\tbar y $1 \t # was generating malformed utf8 '[\x{100}\xff]'i \x{ff} y $& \x{ff} + +((??{ "(?:|)" }))\s C\x20 y - -