diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1999-02-07 12:00:10 -0500 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-02-07 23:27:32 +0000 |
commit | e60df1faf6a2408e6441d757a835423e1efdcc95 (patch) | |
tree | 4c7f5508792e61a1c8da9af75c025262a2971879 /t/op/pat.t | |
parent | 4327152a8da835b489f2314100b405920cc614ea (diff) | |
download | perl-e60df1faf6a2408e6441d757a835423e1efdcc95.tar.gz |
Fix list-context //g with zero-length matches
Message-ID: <19990207170009.A894@monk.mps.ohio-state.edu>
p4raw-id: //depot/perl@2827
Diffstat (limited to 't/op/pat.t')
-rwxr-xr-x | t/op/pat.t | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t index 63219a39f8..b56f7b4009 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -4,7 +4,7 @@ # the format supported by op/regexp.t. If you want to add a test # that does fit that format, add it to op/re_tests, not here. -print "1..184\n"; +print "1..185\n"; BEGIN { chdir 't' if -d 't'; @@ -843,6 +843,12 @@ print "not " unless($1 eq 'cd'); print "ok $test\n"; $test++; +$_='123x123'; +@res = /(\d*|x)/g; +print "not " unless('123||x|123|' eq join '|', @res); +print "ok $test\n"; +$test++; + # see if matching against temporaries (created via pp_helem()) is safe { foo => "ok $test\n".$^X }->{foo} =~ /^(.*)\n/g; print "$1\n"; |