X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git;a=blobdiff_plain;f=t%2F11-maps-name.t;h=ca48370ee7853b3cdbd90c81bdeaafe9a17adcb6;hp=884c61fdc8575829a115f534fc8d089be9c7ccfe;hb=b43c3fc0fe6291fc7aa4c97c48fe0e29d312c071;hpb=3a6840c4ec1f85e05975608542b33a53eacbfac1 diff --git a/t/11-maps-name.t b/t/11-maps-name.t index 884c61f..ca48370 100644 --- a/t/11-maps-name.t +++ b/t/11-maps-name.t @@ -3,17 +3,40 @@ use strict; use warnings; -use Test::More tests => 4; +use Test::More tests => 1 + 7 + 9; use CPANPLUS::Dist::Gentoo::Maps; -our %gentooisms; -*gentooisms = \%CPANPLUS::Dist::Gentoo::Maps::gentooisms; - -is scalar(keys %gentooisms), 76, 'gentooisms are all there'; - -is $gentooisms{PathTools}, 'File-Spec', 'gentooisms were correctly loaded'; - -is CPANPLUS::Dist::Gentoo::Maps::name_c2g('PathTools'), 'File-Spec', 'name_c2g maps gentooisms correctly'; - -is CPANPLUS::Dist::Gentoo::Maps::name_c2g('CPANPLUS-Dist-Gentoo'), 'CPANPLUS-Dist-Gentoo', 'name_c2g returns non gentooisms correctly'; +*nc2g = \&CPANPLUS::Dist::Gentoo::Maps::name_c2g; + +is nc2g('CPANPLUS-Dist-Gentoo'), 'CPANPLUS-Dist-Gentoo', 'name_c2g returns non gentooisms correctly'; + +my %core_gentooisms = ( + 'ANSIColor' => 'Term-ANSIColor', + 'Digest' => 'digest-base', + 'I18N-LangTags' => 'i18n-langtags', + 'Locale-Maketext' => 'locale-maketext', + 'Net-Ping' => 'net-ping', + 'Pod-Parser' => 'PodParser', + 'PathTools' => 'File-Spec', +); + +for my $dist (sort keys %core_gentooisms) { + is nc2g($dist), $core_gentooisms{$dist}, "name_c2g('$dist')"; +} + +my %cpan_gentooisms = ( + 'CGI-Simple' => 'Cgi-Simple', + 'Date-Manip' => 'DateManip', + 'Gtk2' => 'gtk2-perl', + 'Log-Dispatch' => 'log-dispatch', + 'Math-Pari' => 'math-pari', + 'Regexp-Common' => 'regexp-common', + 'Tk' => 'perl-tk', + 'Wx' => 'wxperl', + 'YAML' => 'yaml', +); + +for my $dist (sort keys %cpan_gentooisms) { + is nc2g($dist), $cpan_gentooisms{$dist}, "name_c2g('$dist')"; +}