"Zerolength charname in charclass doesn't match \\\\0"];
ok $w && $w =~ /Ignoring zero length/,
'Ignoring zero length \N{} in character class warning';
+ undef $w;
+ eval q [ok 'xy' =~ /x[\N{EMPTY-STR} y]/x,
+ 'Empty string charname in [] is ignored; finds a following character'];
+ ok $w && $w =~ /Ignoring zero length/,
+ 'Ignoring zero length \N{} in character class warning';
+ undef $w;
+ eval q [ok 'x ' =~ /x[\N{EMPTY-STR} y]/,
+ 'Empty string charname in [] is ignored; finds a following blank under /x'];
+ ok $w && $w =~ /Ignoring zero length/,
+ 'Ignoring zero length \N{} in character class warning';
ok 'AB' =~ /(\N{EVIL})/ && $1 eq 'A', 'Charname caching $1';
ok 'ABC' =~ /(\N{EVIL})/, 'Charname caching $1';
print ">$1<\n";
EOP
- local $::TODO = 'RT #86042';
fresh_perl_is(<<'EOP', ">abc<\n", {}, 'no mention of $&');
my $x;
($x='abc')=~/(abc)/g;
my @notIsPunct = grep {/[[:punct:]]/ and not /\p{IsPunct}/}
map {chr} 0x20 .. 0x7f;
- is(join ('', @notIsPunct), '#$%&*+-<=>@^`|~',
+ is(join ('', @notIsPunct), '$+<=>^`|~',
'[:punct:] disagrees with IsPunct on Symbols');
my @isPrint = grep {not /[[:print:]]/ and /\p{IsPrint}/}
"chr(0xFFFF_FFFE) can match a Unicode property");
ok(chr(0xFFFF_FFFF) =~ /\p{Is_32_Bit_Super}/,
"chr(0xFFFF_FFFF) can match a Unicode property");
+ my $p = qr/^[\x{FFFF_FFFF}]$/;
+ ok(chr(0xFFFF_FFFF) =~ $p,
+ "chr(0xFFFF_FFFF) can match itself in a [class]");
}
else {
no warnings 'overflow';
ok(chr(0xFFFF_FFFF_FFFF_FFFF) =~ qr/^\p{Is_Portable_Super}$/,
"chr(0xFFFF_FFFF_FFFF_FFFF) can match a Unicode property");
+ my $p = qr/^[\x{FFFF_FFFF_FFFF_FFFF}]$/;
+ ok(chr(0xFFFF_FFFF_FFFF_FFFF) =~ $p,
+ "chr(0xFFFF_FFFF_FFFF_FFFF) can match itself in a [class]");
+
# This test is because something was declared as 32 bits, but
# should have been cast to 64; only a problem where
# sizeof(STRLEN) != sizeof(UV)