diff options
author | Karl Williamson <khw@cpan.org> | 2017-01-13 13:53:17 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-01-19 10:24:01 -0700 |
commit | 8bafd282a6fa128ebec02d04e12692c4b75a7d3f (patch) | |
tree | bac685b40b8c5838bad6163602e9ececa8974dfb /t/re | |
parent | 92ff660bc8c29480a311c0b95430f16c175961db (diff) | |
download | perl-8bafd282a6fa128ebec02d04e12692c4b75a7d3f.tar.gz |
Fix bug with a digit range under re 'strict'
"use re 'strict" is supposed to warn if a range whose start and end
points are digits aren't from the same group of 10. For example, if you
mix Bengali and Thai digits. It wasn't working properly for 5 groups of
mathematical digits starting at U+1D7E. This commit fixes that, and
refactors the code to bail out as soon as it discovers that no warning
is warranted, instead of doing unnecessary work.
Diffstat (limited to 't/re')
-rw-r--r-- | t/re/reg_mesg.t | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t index 050448b66c..22711d5f62 100644 --- a/t/re/reg_mesg.t +++ b/t/re/reg_mesg.t @@ -628,6 +628,9 @@ my @warning_utf8_only_under_strict = mark_as_utf8( '/ネ(?[ [ ᪉ - ᪐ ] ])/; #no latin1' => "Ranges of digits should be from the same group of 10 {#} m/ネ(?[ [ ᪉ - ᪐ {#}] ])/", '/ネ[᧙-᧚]/; #no latin1' => "Ranges of digits should be from the same group of 10 {#} m/ネ[᧙-᧚{#}]/", '/ネ(?[ [ ᧙ - ᧚ ] ])/; #no latin1' => "Ranges of digits should be from the same group of 10 {#} m/ネ(?[ [ ᧙ - ᧚ {#}] ])/", + '/ネ(?[ [ 𝟘 - 𝟡 ] ])/; #no latin1' => "", + '/ネ(?[ [ 𝟧 - 𝟱 ] ])/; #no latin1' => "Ranges of digits should be from the same group of 10 {#} m/ネ(?[ [ 𝟧 - 𝟱 {#}] ])/", + '/ネ(?[ [ 𝟧 - 𝟰 ] ])/; #no latin1' => "Ranges of digits should be from the same group of 10 {#} m/ネ(?[ [ 𝟧 - 𝟰 {#}] ])/", ); push @warning_only_under_strict, @warning_utf8_only_under_strict; |