summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2015-10-19 09:12:46 -0600
committerSteve Hay <steve.m.hay@googlemail.com>2015-10-30 21:04:09 +0000
commit4866d497e88693df3d50c8701d7cc6ec23fc0006 (patch)
tree6197fba2c38c8346d325506db9ed3328bc3e1646
parent614f835fb46f1baa80650a6385ffd506817ada81 (diff)
downloadperl-4866d497e88693df3d50c8701d7cc6ec23fc0006.tar.gz
Add TODO tests for [perl #126319]
Some of these pass already, but may temporarily fail as a result of the next few commits, until it all gets straightened out in the end. (cherry picked from commit da271c5413343d25ab18d217cdc225c0be1633d9)
-rw-r--r--t/re/re_tests9
-rw-r--r--t/re/subst.t24
2 files changed, 31 insertions, 2 deletions
diff --git a/t/re/re_tests b/t/re/re_tests
index 077aba609c..23d90f8d74 100644
--- a/t/re/re_tests
+++ b/t/re/re_tests
@@ -134,7 +134,14 @@ a[^]b]c adc y $& adc
\By\b xy y - -
\by\B yz y - -
\By\B xyz y - -
-\B y - -
+\b nT - -
+\b{gcb} nT - -
+\b{sb} nT - -
+\b{wb} nT - -
+\B yT - -
+\B{gcb} yT - -
+\B{sb} yT - -
+\B{wb} yT - -
\w a y - -
\w - n - -
\W a n - -
diff --git a/t/re/subst.t b/t/re/subst.t
index 6963c4217e..c4865203bb 100644
--- a/t/re/subst.t
+++ b/t/re/subst.t
@@ -8,7 +8,7 @@ BEGIN {
require './charset_tools.pl';
}
-plan( tests => 261 );
+plan( tests => 267 );
$_ = 'david';
$a = s/david/rules/r;
@@ -1034,6 +1034,28 @@ SKIP: {
is("$division$division$division" =~ s/\B/!/ugr, "!$division!$division!$division!", '\\B matches Latin1 before string, mid, and end, /u');
is("\x{2028}\x{2028}\x{2028}" =~ s/\B/!/ugr, "!\x{2028}!\x{2028}!\x{2028}!", '\\B matches above-Latin1 before string, mid, and end, /u');
+ {
+ local $TODO = 1;
+ fresh_perl_like( '$_=""; /\b{gcb}/; s///g', qr/^$/, {},
+ '[perl #126319: Segmentation fault in Perl_sv_catpvn_flags with \b{gcb}'
+ );
+ fresh_perl_like( '$_=""; /\B{gcb}/; s///g', qr/^$/, {},
+ '[perl #126319: Segmentation fault in Perl_sv_catpvn_flags with \b{gcb}'
+ );
+ fresh_perl_like( '$_=""; /\b{wb}/; s///g', qr/^$/, {},
+ '[perl #126319: Segmentation fault in Perl_sv_catpvn_flags with \b{wb}'
+ );
+ fresh_perl_like( '$_=""; /\B{wb}/; s///g', qr/^$/, {},
+ '[perl #126319: Segmentation fault in Perl_sv_catpvn_flags with \b{wb}'
+ );
+ fresh_perl_like( '$_=""; /\b{sb}/; s///g', qr/^$/, {},
+ '[perl #126319: Segmentation fault in Perl_sv_catpvn_flags with \b{sb}'
+ );
+ fresh_perl_like( '$_=""; /\B{sb}/; s///g', qr/^$/, {},
+ '[perl #126319: Segmentation fault in Perl_sv_catpvn_flags with \b{sb}'
+ );
+ }
+
SKIP: {
eval { require POSIX; POSIX->import("locale_h"); };
if ($@ || !eval { &POSIX::LC_ALL; 1 }) {