diff options
author | Karl Williamson <khw@cpan.org> | 2018-12-16 11:54:03 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-12-16 12:08:06 -0700 |
commit | cc27c3b3ef8a22c153554c7756ac1a22daddff28 (patch) | |
tree | a133fb2ce459f260e364aff16492558c506f127e /t/re | |
parent | b20a43d74c4dca14f892166850418e52b35ba5a4 (diff) | |
download | perl-cc27c3b3ef8a22c153554c7756ac1a22daddff28.tar.gz |
Correct previous perldelta entry, and add a test
The text of perl5294delta was wrong about a change. This commit changes
that text, and adds an entry to the latest perldelta with the
correction. A test has been added to verify the way things work.
The wrong language led to this blog post, and my comment in it:
https://www.effectiveperlprogramming.com/2018/12/perl-v5-30-lets-you-match-more-with-the-general-quantifier/
Diffstat (limited to 't/re')
-rw-r--r-- | t/re/pat.t | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/t/re/pat.t b/t/re/pat.t index ddd34fbd8d..b9c1e262ca 100644 --- a/t/re/pat.t +++ b/t/re/pat.t @@ -23,7 +23,7 @@ BEGIN { skip_all('no re module') unless defined &DynaLoader::boot_DynaLoader; skip_all_without_unicode_tables(); -plan tests => 850; # Update this when adding/deleting tests. +plan tests => 851; # Update this when adding/deleting tests. run_tests() unless caller; @@ -339,6 +339,11 @@ sub run_tests { like($@, qr/^\QQuantifier in {,} bigger than/, $message); eval "'aaa' =~ /a{1,$::reg_infty_p}/"; like($@, qr/^\QQuantifier in {,} bigger than/, $message); + + # It should be 'a' x 2147483647, but that exhausts memory on + # reasonably sized modern machines + like('a' x $::reg_infty_p, qr/a{1,}/, + "{1,} matches more times than REG_INFTY"); } { |