summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-11-22 15:28:13 -0700
committerKarl Williamson <khw@cpan.org>2019-11-22 15:54:44 -0700
commit53d42e43e359facdd83b313c1f4b70f9ff559a70 (patch)
treed1e8547bbdfa043aaa7cd7a23b58ffcbc25a8fdc /t
parent008bb368ebc18adc42e95769e4ebbd7d5545ce3d (diff)
downloadperl-53d42e43e359facdd83b313c1f4b70f9ff559a70.tar.gz
PATCH: gh #17319 Segfault
It turns out that one isn't supposed to fill in the offset to the next regnode at node creation time. And this node is like EXACTish, so the string stuff isn't accounted for in its regcomp.sym definition
Diffstat (limited to 't')
-rw-r--r--t/re/pat.t11
1 files changed, 10 insertions, 1 deletions
diff --git a/t/re/pat.t b/t/re/pat.t
index ccf494c302..7d07d9981e 100644
--- a/t/re/pat.t
+++ b/t/re/pat.t
@@ -25,7 +25,7 @@ BEGIN {
skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader;
skip_all_without_unicode_tables();
-plan tests => 1005; # Update this when adding/deleting tests.
+plan tests => 1011; # Update this when adding/deleting tests.
run_tests() unless caller;
@@ -2207,6 +2207,15 @@ SKIP:
unlike("\x{4000004}", $pat, "4000004 isn't in pattern");
like("\x{4000005}", $pat, "4000005 is in pattern");
unlike("\x{4000006}", $pat, "4000006 isn't in pattern");
+
+ # gh #17319
+ $pat = qr/[\N{U+200D}\N{U+2000}]()/;
+ unlike("\x{1FFF}", $pat, "1FFF isn't in pattern");
+ like("\x{2000}", $pat, "2000 is in pattern");
+ unlike("\x{2001}", $pat, "2001 isn't in pattern");
+ unlike("\x{200C}", $pat, "200C isn't in pattern");
+ like("\x{200D}", $pat, "200 is in pattern");
+ unlike("\x{200E}", $pat, "200E isn't in pattern");
}
} # End of sub run_tests