X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fop%2Fpat.t;h=81591fc71bb2c56b488fc75408b45b495008dfcc;hb=016a42f39635e4e96555aee41f820c77d820b582;hp=e00328c91fe932a067947236794fcd7527852adb;hpb=ee8c7f5465f003860e2347a2946abacac39bd9b9;p=p5sagit%2Fp5-mst-13.2.git diff --git a/t/op/pat.t b/t/op/pat.t index e00328c..81591fc 100755 --- a/t/op/pat.t +++ b/t/op/pat.t @@ -4,7 +4,7 @@ # the format supported by op/regexp.t. If you want to add a test # that does fit that format, add it to op/re_tests, not here. -print "1..213\n"; +print "1..215\n"; BEGIN { chdir 't' if -d 't'; @@ -1012,3 +1012,12 @@ EOE $a and $a =~ /^Object\sS/ or print "# '$a' \nnot "; print "ok $test\n"; $test++; + +# test result of match used as match (!) +'a1b' =~ ('xyz' =~ /y/) and $` eq 'a' or print "not "; +print "ok $test\n"; +$test++; + +'a1b' =~ ('xyz' =~ /t/) and $` eq 'a' or print "not "; +print "ok $test\n"; +$test++;