summaryrefslogtreecommitdiff
path: root/t/re
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-08-18 12:19:00 -0600
committerKarl Williamson <public@khwilliamson.com>2012-08-25 23:21:27 -0600
commit01c5845aa92ba1bd86b3f470191149df4f878d3d (patch)
treeecfcb74ac068d5a85466c43a9517f029dbc4e61b /t/re
parent5b348b71b6aa004c25b0c805567d95fd5476776e (diff)
downloadperl-01c5845aa92ba1bd86b3f470191149df4f878d3d.tar.gz
regcomp.c: Special case /[UV_MAX]/
The highest code point representable on the machine has to be special cased. Earlier commits for 5.14 did this for ranges ending in this code point, but it turns out there needs to be a special-special case when the range contains just it.
Diffstat (limited to 't/re')
-rw-r--r--t/re/pat_advanced.t7
1 files changed, 7 insertions, 0 deletions
diff --git a/t/re/pat_advanced.t b/t/re/pat_advanced.t
index 771e441db0..7408fdff59 100644
--- a/t/re/pat_advanced.t
+++ b/t/re/pat_advanced.t
@@ -2178,6 +2178,9 @@ EOP
"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';
@@ -2186,6 +2189,10 @@ EOP
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)