X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Fpos.t;h=f3bc23c84ac861a6e827dd40d95574dbe33262cc;hb=95e8664e86da93255f26600f44bbbd70bf5b5b0e;hp=46811b7bbc7d5201143c309bbfa0cb8be0e44d59;hpb=43051805d53a3e4c5b2185a17655cab5bedc17ed;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/pos.t b/t/op/pos.t index 46811b7..f3bc23c 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"; + + +