summaryrefslogtreecommitdiff
path: root/t/op/pos.t
diff options
context:
space:
mode:
Diffstat (limited to 't/op/pos.t')
-rwxr-xr-xt/op/pos.t9
1 files changed, 8 insertions, 1 deletions
diff --git a/t/op/pos.t b/t/op/pos.t
index 46811b7bbc..f3bc23c84a 100755
--- a/t/op/pos.t
+++ b/t/op/pos.t
@@ -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";
+
+
+