summaryrefslogtreecommitdiff
path: root/t/op/subst.t
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2001-10-10 19:23:44 +0200
committerAbhijit Menon-Sen <ams@wiw.org>2001-10-10 14:49:43 +0000
commit8e5e9ebe73253381295c8c22fd24720255d732e9 (patch)
treeaf776933651524f9a51e600df3dcc23e2b74498e /t/op/subst.t
parent737c380eddfcfb819f42666b6b5bd6171d245f53 (diff)
downloadperl-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-xt/op/subst.t8
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;