diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2001-10-10 19:23:44 +0200 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2001-10-10 14:49:43 +0000 |
commit | 8e5e9ebe73253381295c8c22fd24720255d732e9 (patch) | |
tree | af776933651524f9a51e600df3dcc23e2b74498e /t/op/subst.t | |
parent | 737c380eddfcfb819f42666b6b5bd6171d245f53 (diff) | |
download | perl-8e5e9ebe73253381295c8c22fd24720255d732e9.tar.gz |
two s/// bugfixes
Message-Id: <20011010172344.C22440@rafael>
p4raw-id: //depot/perl@12392
Diffstat (limited to 't/op/subst.t')
-rwxr-xr-x | t/op/subst.t | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/t/op/subst.t b/t/op/subst.t index 10ad7fe1c3..e5eb85b778 100755 --- a/t/op/subst.t +++ b/t/op/subst.t @@ -7,7 +7,7 @@ BEGIN { } require './test.pl'; -plan( tests => 86 ); +plan( tests => 87 ); $x = 'foo'; $_ = "x"; @@ -298,7 +298,11 @@ s{ \d+ \b [,.;]? (?{ 'digits' }) [^A-Za-z0-9\s]+ (?{ '$@%#' }) }{$^R}xg; ok( $_ eq $foo ); -ok( $snum == 31, "# TODO \$snum == $snum, should be 31" ); +ok( $snum == 31 ); + +$_ = 'a' x 6; +$snum = s/a(?{})//g; +ok( $_ eq '' && $snum == 6 ); $_ = 'x' x 20; $snum = s/(\d*|x)/<$1>/g; |