diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1999-05-24 22:42:23 -0400 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-05-25 09:14:51 +0000 |
commit | cf93c79d660ae36ccc5f83d949c599473fc522ce (patch) | |
tree | 990c1003b82a9b439144bee4075daab1ba3d13d9 /t/op/pat.t | |
parent | a99f88279527854d73f6b517b869d613f02be3d1 (diff) | |
download | perl-cf93c79d660ae36ccc5f83d949c599473fc522ce.tar.gz |
REx engine improvements
Message-Id: <199905250642.CAA06208@monk.mps.ohio-state.edu>
p4raw-id: //depot/perl@3475
Diffstat (limited to 't/op/pat.t')
-rwxr-xr-x | t/op/pat.t | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t index b6a3a3a240..a086c12eaf 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..186\n"; +print "1..188\n"; BEGIN { chdir 't' if -d 't'; @@ -858,3 +858,17 @@ $test++; print "$1\n"; $test++; +# See if $i work inside (?{}) in the presense of saved substrings and +# changing $_ +@a = qw(foo bar); +@b = (); +s/(\w)(?{push @b, $1})/,$1,/g for @a; + +print "# \@b='@b', expect 'f o o b a r'\nnot " unless("@b" eq "f o o b a r"); +print "ok $test\n"; +$test++; + +print "not " unless("@a" eq ",f,,o,,o, ,b,,a,,r,"); +print "ok $test\n"; +$test++; + |