summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorHugo van der Sanden <hv@crypt.org>2003-07-31 19:59:43 +0100
committerJarkko Hietaniemi <jhi@iki.fi>2003-07-31 19:57:36 +0000
commitb0e70d55183e72f46527dd222872eff0e4a92c42 (patch)
tree0360b624f6615d0d58b78220efe7cb9238d57269 /t
parent1ef57a5cc2e49e0fc5bdab2d40bc9f1dd2983a4e (diff)
downloadperl-b0e70d55183e72f46527dd222872eff0e4a92c42.tar.gz
Re: [perl #23171] Regex too selfish
Message-Id: <200307311759.h6VHxhn06664@zen.crypt.org> (choose the second code patch) p4raw-id: //depot/perl@20387
Diffstat (limited to 't')
-rw-r--r--t/op/re_tests16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/op/re_tests b/t/op/re_tests
index d7e24f3b9f..3daa6762be 100644
--- a/t/op/re_tests
+++ b/t/op/re_tests
@@ -924,3 +924,19 @@ ab(?i)cd abCd y - -
(??{}) x y - -
a(b)?? abc y <$1> <> # undef [perl #16773]
(\d{1,3}\.){3,} 128.134.142.8 y <$1> <142.> # [perl #18019]
+^.{3,4}(.+)\1\z foobarbar y $1 bar # 16 tests for [perl #23171]
+^(?:f|o|b){3,4}(.+)\1\z foobarbar y $1 bar
+^.{3,4}((?:b|a|r)+)\1\z foobarbar y $1 bar
+^(?:f|o|b){3,4}((?:b|a|r)+)\1\z foobarbar y $1 bar
+^.{3,4}(.+?)\1\z foobarbar y $1 bar
+^(?:f|o|b){3,4}(.+?)\1\z foobarbar y $1 bar
+^.{3,4}((?:b|a|r)+?)\1\z foobarbar y $1 bar
+^(?:f|o|b){3,4}((?:b|a|r)+?)\1\z foobarbar y $1 bar
+^.{2,3}?(.+)\1\z foobarbar y $1 bar
+^(?:f|o|b){2,3}?(.+)\1\z foobarbar y $1 bar
+^.{2,3}?((?:b|a|r)+)\1\z foobarbar y $1 bar
+^(?:f|o|b){2,3}?((?:b|a|r)+)\1\z foobarbar y $1 bar
+^.{2,3}?(.+?)\1\z foobarbar y $1 bar
+^(?:f|o|b){2,3}?(.+?)\1\z foobarbar y $1 bar
+^.{2,3}?((?:b|a|r)+?)\1\z foobarbar y $1 bar
+^(?:f|o|b){2,3}?((?:b|a|r)+?)\1\z foobarbar y $1 bar