$| = 1;
-print "1..903\n";
+print "1..908\n";
BEGIN {
chdir 't' if -d 't';
{
- my $test = 893;
-
print "# Unicode hash keys and \\w\n";
# This is not really a regex test but regexes bring
# out the issue nicely.
use strict;
+ my $test = 893;
my $u3 = "f\x{df}\x{100}";
my $u2 = substr($u3,0,2);
my $u1 = substr($u2,0,1);
}
}
+{
+ print "# qr/.../x\n";
+ my $test = 904;
+
+ my $R = qr/ A B C # D E/x;
+
+ print eval {"ABCDE" =~ $R} ? "ok $test\n" : "not ok $test\n";
+ $test++;
+
+ print eval {"ABCDE" =~ m/$R/} ? "ok $test\n" : "not ok $test\n";
+ $test++;
+
+ print eval {"ABCDE" =~ m/($R)/} ? "ok $test\n" : "not ok $test\n";
+ $test++;
+}
+
+{
+ print "# illegal Unicode properties\n";
+ my $test = 907;
+
+ print eval { "a" =~ /\pq / } ? "not ok $test\n" : "ok $test\n";
+ $test++;
+
+ print eval { "a" =~ /\p{qrst} / } ? "not ok $test\n" : "ok $test\n";
+ $test++;
+}