diff options
author | Karl Williamson <khw@cpan.org> | 2022-03-06 13:10:12 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-03-19 12:49:28 -0600 |
commit | 737a7c2c21f154d6bef1c3665a841788a91f8660 (patch) | |
tree | 8b0a03176b29e230c8afb1ac23a8ef6d761e0c56 /t/re | |
parent | f3b9d183e48ac2bea3a55de469c56ca0e57884ce (diff) | |
download | perl-737a7c2c21f154d6bef1c3665a841788a91f8660.tar.gz |
Remove use of experimental regex sets warnings
These warnings are no longer generated; so simplify the core by not
trying to turn them off.
The warning is preserved so that other code need not change, but this
commit also turns the default generation of it off.
Diffstat (limited to 't/re')
-rw-r--r-- | t/re/reg_email.t | 1 | ||||
-rw-r--r-- | t/re/regex_sets.t | 17 | ||||
-rw-r--r-- | t/re/regexp.t | 2 |
3 files changed, 9 insertions, 11 deletions
diff --git a/t/re/reg_email.t b/t/re/reg_email.t index 7a57b66d3f..65b086a081 100644 --- a/t/re/reg_email.t +++ b/t/re/reg_email.t @@ -10,7 +10,6 @@ BEGIN { } use strict; -no warnings 'experimental::regex_sets'; my $email = qr { (?(DEFINE) diff --git a/t/re/regex_sets.t b/t/re/regex_sets.t index 21d7a09a79..69800264e2 100644 --- a/t/re/regex_sets.t +++ b/t/re/regex_sets.t @@ -21,7 +21,6 @@ use warnings; $| = 1; use utf8; -no warnings 'experimental::regex_sets'; like("a", qr/(?[ [a] # This is a comment ])/, 'Can ignore a comment'); @@ -173,13 +172,13 @@ for my $char ("٠", "٥", "٩") { # RT #126481 !! with syntax error panics { - fresh_perl_like('no warnings "experimental::regex_sets"; qr/(?[ ! ! (\w])/', + fresh_perl_like('qr/(?[ ! ! (\w])/', qr/^Unmatched \(/, {}, 'qr/(?[ ! ! (\w])/ doesnt panic'); # The following didn't panic before, but easy to add this here with a # paren between the !! - fresh_perl_like('no warnings "experimental::regex_sets";qr/(?[ ! ( ! (\w)])/', + fresh_perl_like('qr/(?[ ! ( ! (\w)])/', qr/^Unmatched \(/, {}, 'qr/qr/(?[ ! ( ! (\w)])/'); } @@ -205,19 +204,19 @@ for my $char ("٠", "٥", "٩") { } { # [perl #132167] - fresh_perl_is('no warnings "experimental::regex_sets"; - print "c" =~ qr/(?[ ( \p{Uppercase} ) + (\p{Lowercase} - ([a] + [b])) ])/;', + fresh_perl_is( + 'print "c" =~ qr/(?[ ( \p{Uppercase} ) + (\p{Lowercase} - ([a] + [b])) ])/;', 1, {}, 'qr/(?[ ( \p{Uppercase} ) + (\p{Lowercase} - ([a] + [b])) ]) compiles and properly matches'); - fresh_perl_is('no warnings "experimental::regex_sets"; - print "b" =~ qr/(?[ ( \p{Uppercase} ) + (\p{Lowercase} - ([a] + [b])) ])/;', + fresh_perl_is( + 'print "b" =~ qr/(?[ ( \p{Uppercase} ) + (\p{Lowercase} - ([a] + [b])) ])/;', "", {}, 'qr/(?[ ( \p{Uppercase} ) + (\p{Lowercase} - ([a] + [b])) ]) compiles and properly matches'); } { # [perl #133889] Caused assertion failure - fresh_perl_like('no warnings "experimental::regex_sets"; - qr/(?[\P{Is0}])/', qr/\QUnknown user-defined property name "Is0"/, {}, "[perl #133889]"); + fresh_perl_like( + 'qr/(?[\P{Is0}])/', qr/\QUnknown user-defined property name "Is0"/, {}, "[perl #133889]"); } { diff --git a/t/re/regexp.t b/t/re/regexp.t index fee1a48c88..03a7178157 100644 --- a/t/re/regexp.t +++ b/t/re/regexp.t @@ -474,7 +474,7 @@ EOFCODE \$got = "$repl"; EOFCODE } - $code = "no warnings 'experimental::regex_sets';$code" if $regex_sets; + $code = "$code" if $regex_sets; #$code.=qq[\n\$expect="$expect";\n]; #use Devel::Peek; #die Dump($code) if $pat=~/\\h/ and $subject=~/\x{A0}/; |