diff options
Diffstat (limited to 't/op/utfhash.t')
-rw-r--r-- | t/op/utfhash.t | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/t/op/utfhash.t b/t/op/utfhash.t index 33909c0cbc..32a182635a 100644 --- a/t/op/utfhash.t +++ b/t/op/utfhash.t @@ -175,6 +175,17 @@ foreach ("\x7f","\xff") } { + local $/; # Slurp. + my $utf8 = <DATA>; + my $utfebcdic = <DATA>; + if (ord('A') == 65) { + eval $utf8; + } elsif (ord('A') == 193) { + eval $utfebcdic; + } +} +__END__ +{ # See if utf8 barewords work [perl #22969] use utf8; my %hash = (тест => 123); @@ -186,3 +197,16 @@ foreach ("\x7f","\xff") is($hash{тест}, 123); is($hash{'тест'}, 123); } +__END__ +{ + # See if utf8 barewords work [perl #22969] + use utf8; # UTF-EBCDIC, really. + my %hash = ( => 123); + is($hash{}, $hash{''}); + is($hash{}, 123); + is($hash{''}, 123); + %hash = ( => 123); + is($hash{}, $hash{''}); + is($hash{}, 123); + is($hash{''}, 123); +} |