diff options
author | Chip Salzenberg <chip@pobox.com> | 2009-08-26 14:33:15 -0700 |
---|---|---|
committer | Chip Salzenberg <chip@pobox.com> | 2009-08-26 14:33:15 -0700 |
commit | eaf7a4d2ee7805b14e26e634fba0893913924a6c (patch) | |
tree | 4c932a2ae4599ff971a6e2b488ea8208d2510182 /t | |
parent | 8ff3e83ba54cff6118a4f9fd629260c21194f290 (diff) | |
download | perl-eaf7a4d2ee7805b14e26e634fba0893913924a6c.tar.gz |
In C<use utf8; a=>'b'>, do not set utf8 flag on 'a' [perl #68812]
Diffstat (limited to 't')
-rw-r--r-- | t/op/utfhash.t | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/t/op/utfhash.t b/t/op/utfhash.t index 32a182635a..a9af502fbf 100644 --- a/t/op/utfhash.t +++ b/t/op/utfhash.t @@ -5,7 +5,7 @@ BEGIN { @INC = '../lib'; require './test.pl'; - plan(tests => 97); + plan(tests => 99); } use strict; @@ -196,6 +196,12 @@ __END__ is($hash{тест}, $hash{'тест'}); is($hash{тест}, 123); is($hash{'тест'}, 123); + + # See if plain ASCII strings quoted with '=>' erroneously get utf8 flag [perl #68812] + my %foo = (a => 'b', 'c' => 'd'); + for my $key (keys %foo) { + ok !utf8::is_utf8($key), "'$key' shouldn't have utf8 flag"; + } } __END__ { @@ -209,4 +215,10 @@ __END__ is($hash{}, $hash{''}); is($hash{}, 123); is($hash{''}, 123); + + # See if plain ASCII strings quoted with '=>' erroneously get utf8 flag [perl #68812] + my %foo = (a => 'b', 'c' => 'd'); + for my $key (keys %foo) { + ok !utf8::is_utf8($key), "'$key' shouldn't have utf8 flag"; + } } |