diff options
author | 2021-03-01 23:19:42 +0000 | |
---|---|---|
committer | 2021-03-01 23:19:42 +0000 | |
commit | 56d68f1e19ff848c889ecfa71d3a06340ff64892 (patch) | |
tree | 272372e9e82dd675d06054187c7f04b32fe71acc /gnu/usr.bin/perl/cpan/Module-Metadata/t | |
parent | Import perl-5.32.1 (diff) | |
download | wireguard-openbsd-56d68f1e19ff848c889ecfa71d3a06340ff64892.tar.xz wireguard-openbsd-56d68f1e19ff848c889ecfa71d3a06340ff64892.zip |
Fix merge issues, remove excess files - match perl-5.32.1 dist
OK sthen@
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Module-Metadata/t')
-rw-r--r-- | gnu/usr.bin/perl/cpan/Module-Metadata/t/metadata.t | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/gnu/usr.bin/perl/cpan/Module-Metadata/t/metadata.t b/gnu/usr.bin/perl/cpan/Module-Metadata/t/metadata.t index 0f2e414c7fc..3eea8d96663 100644 --- a/gnu/usr.bin/perl/cpan/Module-Metadata/t/metadata.t +++ b/gnu/usr.bin/perl/cpan/Module-Metadata/t/metadata.t @@ -3,6 +3,7 @@ use strict; use warnings; +use Encode 'decode'; use Test::More 0.82; use IO::File; use File::Spec; @@ -16,7 +17,7 @@ use GeneratePackage; my $tmpdir = GeneratePackage::tmpdir(); -plan tests => 71; +plan tests => 72; require_ok('Module::Metadata'); @@ -209,13 +210,15 @@ $VERSION = '0.01'; package Simple::Ex; $VERSION = '0.02'; +=encoding UTF-8 + =head1 NAME Simple - It's easy. =head1 AUTHOR -Simple Simon +Símple Simon You can find me on the IRC channel #simon on irc.perl.org. @@ -270,7 +273,7 @@ You can find me on the IRC channel my %expected = ( NAME => q|Simple - It's easy.|, AUTHOR => <<'EXPECTED' -Simple Simon +Símple Simon You can find me on the IRC channel #simon on irc.perl.org. @@ -282,6 +285,13 @@ EXPECTED } is( $pod{NAME}, $expected{NAME}, 'collected NAME pod section' ); is( $pod{AUTHOR}, $expected{AUTHOR}, 'collected AUTHOR pod section' ); + + my $pm_info2 = Module::Metadata->new_from_module( + 'Simple', inc => [ 'lib', @INC ], collect_pod => 1, decode_pod => 1 ); + my $author = $pm_info2->pod( 'AUTHOR' ); + $author =~ s/^\s+//; + $author =~ s/\s+$//; + is( $author, decode('UTF-8', $expected{AUTHOR} ), 'collected AUTHOR pod section in UTF-8' ); } { |