summaryrefslogtreecommitdiff
path: root/t/op/pat.t
diff options
context:
space:
mode:
Diffstat (limited to 't/op/pat.t')
-rwxr-xr-xt/op/pat.t21
1 files changed, 20 insertions, 1 deletions
diff --git a/t/op/pat.t b/t/op/pat.t
index 8496f95a1e..ed02ae3126 100755
--- a/t/op/pat.t
+++ b/t/op/pat.t
@@ -6,7 +6,7 @@
$| = 1;
-print "1..924\n";
+print "1..928\n";
BEGIN {
chdir 't' if -d 't';
@@ -2911,3 +2911,22 @@ print(('goodfood' =~ $a ? '' : 'not '),
print(($a eq '(?-xism:foo)' ? '' : 'not '),
"ok $test\t# reblessed qr// stringizes\n");
++$test;
+
+$x = "\x{3fe}";
+$a = qr/$x/;
+print(($x =~ $a ? '' : 'not '), "ok $test - utf8 interpolation in qr//\n");
+++$test;
+
+print(("a$a" =~ $x ? '' : 'not '),
+ "ok $test - stringifed qr// preserves utf8 # TODO\n");
+++$test;
+
+print(("a$x" =~ qr/a$a/ ? '' : 'not '),
+ "ok $test - interpolated qr// preserves utf8 # TODO\n");
+++$test;
+
+print(("a$x" =~ qr/a(??{$a})/ ? '' : 'not '),
+ "ok $test - postponed interpolation of qr// preserves utf8 # TODO\n");
+++$test;
+
+# last test 928