summaryrefslogtreecommitdiff
path: root/t/op/pat.t
diff options
context:
space:
mode:
Diffstat (limited to 't/op/pat.t')
-rwxr-xr-xt/op/pat.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t
index e00328c91f..81591fc71b 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++;