[MacPerl-Porters] [PATCH] Mac OS Compatability for bleadperl
[p5sagit/p5-mst-13.2.git] / t / op / pos.t
index 46811b7..f3bc23c 100755 (executable)
@@ -1,6 +1,6 @@
 #!./perl
 
-print "1..3\n";
+print "1..4\n";
 
 $x='banana';
 $x=~/.a/g;
@@ -14,3 +14,10 @@ sub f { my $p=$_[0]; return $p }
 $x=~/.a/g;
 if (f(pos($x))==4) {print "ok 3\n"} else {print "not ok 3\n";}
 
+# Is pos() set inside //g? (bug id 19990615.008)
+$x = "test string?"; $x =~ s/\w/pos($x)/eg;
+print "not " unless $x eq "0123 5678910?";
+print "ok 4\n";
+
+
+