Navigation Menu

Skip to content

Commit

Permalink
CPAN-Meta-YAML: don't depend on the old :utf8 bugginess
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycoz committed Sep 15, 2021
1 parent 1dede87 commit c74a57b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cpan/CPAN-Meta-YAML/t/11_read_string.t
Expand Up @@ -40,7 +40,10 @@ subtest 'invalid UTF-8' => sub {
# get invalid UTF-8 by reading Latin-1 with lax :utf8 layer
my $string = do {
local $SIG{__WARN__} = sub {};
slurp( test_data_file('latin1.yml'), ":utf8" );
my $ret = slurp( test_data_file('latin1.yml'), ":raw" );
require Encode;
Encode::_utf8_on($ret);
$ret;
};
my $obj = eval { CPAN::Meta::YAML->read_string($string); };
is( $obj, undef, "read_string should return undef" );
Expand Down

0 comments on commit c74a57b

Please sign in to comment.