Disambiguate "Can't locate"
[p5sagit/p5-mst-13.2.git] / t / op / subst.t
index 10ad7fe..e48a1b3 100755 (executable)
@@ -7,7 +7,7 @@ BEGIN {
 }
 
 require './test.pl';
-plan( tests => 86 );
+plan( tests => 88 );
 
 $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; 
@@ -361,3 +365,12 @@ ok( !s/^([a-z]:)/\u$1/ );
 $_ = "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");
+}