]> git.vpit.fr Git - perl/modules/CPANPLUS-Dist-Gentoo.git/blob - t/11-maps-name.t
Correctly map exotic Gentoo versions from CPAN versions
[perl/modules/CPANPLUS-Dist-Gentoo.git] / t / 11-maps-name.t
1 #!perl -T
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 1 + 7 + 9;
7
8 use CPANPLUS::Dist::Gentoo::Maps;
9
10 *nc2g = \&CPANPLUS::Dist::Gentoo::Maps::name_c2g;
11
12 is nc2g('CPANPLUS-Dist-Gentoo'), 'CPANPLUS-Dist-Gentoo', 'name_c2g returns non gentooisms correctly';
13
14 my %core_gentooisms = (
15  'ANSIColor'       => 'Term-ANSIColor',
16  'Digest'          => 'digest-base',
17  'I18N-LangTags'   => 'i18n-langtags',
18  'Locale-Maketext' => 'locale-maketext',
19  'Net-Ping'        => 'net-ping',
20  'Pod-Parser'      => 'PodParser',
21  'PathTools'       => 'File-Spec',
22 );
23
24 for my $dist (sort keys %core_gentooisms) {
25  is nc2g($dist), $core_gentooisms{$dist}, "name_c2g('$dist')";
26 }
27
28 my %cpan_gentooisms = (
29  'CGI-Simple'    => 'Cgi-Simple',
30  'Date-Manip'    => 'DateManip',
31  'Gtk2'          => 'gtk2-perl',
32  'Log-Dispatch'  => 'log-dispatch',
33  'Math-Pari'     => 'math-pari',
34  'Regexp-Common' => 'regexp-common',
35  'Tk'            => 'perl-tk',
36  'Wx'            => 'wxperl',
37  'YAML'          => 'yaml',
38 );
39
40 for my $dist (sort keys %cpan_gentooisms) {
41  is nc2g($dist), $cpan_gentooisms{$dist}, "name_c2g('$dist')";
42 }