diff options
author | Karl Williamson <khw@khw-desktop.(none)> | 2009-12-17 20:07:32 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2009-12-20 16:56:36 +0100 |
commit | 6182169b72782336c6202161aa4cde16ac88296e (patch) | |
tree | 1bb8f6991d83bd95276a28dbe02143c77b4f3731 /t/re | |
parent | f43e267de16a74afaaa452f8fab4810d15b8e797 (diff) | |
download | perl-6182169b72782336c6202161aa4cde16ac88296e.tar.gz |
Allow U+0FFFF in regex
Diffstat (limited to 't/re')
-rw-r--r-- | t/re/pat_advanced.t | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/t/re/pat_advanced.t b/t/re/pat_advanced.t index a0eec5858a..3a66a0c6b9 100644 --- a/t/re/pat_advanced.t +++ b/t/re/pat_advanced.t @@ -21,7 +21,7 @@ BEGIN { } -plan tests => 1142; # Update this when adding/deleting tests. +plan tests => 1143; # Update this when adding/deleting tests. run_tests() unless caller; @@ -1770,6 +1770,17 @@ sub run_tests { iseq $_, "!Bang!1!Bang!2!Bang!3!Bang!"; } + { + # Earlier versions of Perl said this was fatal. + local $Message = "U+0FFFF shouldn't crash the regex engine"; + no warnings 'utf8'; + my $a = eval "chr(65535)"; + use warnings; + my $warning_message; + local $SIG{__WARN__} = sub { $warning_message = $_[0] }; + eval $a =~ /[a-z]/; + ok(1); # If it didn't crash, it worked. + } } # End of sub run_tests 1; |