}
require './test.pl';
-plan( tests => 86 );
+plan( tests => 88 );
$x = 'foo';
$_ = "x";
[^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;
$_ = "Charles Bronson";
$snum = s/\B\w//g;
ok( $_ eq "C B" && $snum == 12 );
+
+{
+ use utf8;
+ my $s = "H\303\266he";
+ my $l = my $r = $s;
+ $l =~ s/[^\w]//g;
+ $r =~ s/[^\w\.]//g;
+ is($l, $r, "use utf8");
+}