X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F13-maps-license.t;fp=t%2F13-maps-license.t;h=0a19d001a0a2630540392dc94b9b02dc166c9c02;hb=69b45a423d8ce50cc9c3cc8cb22a8822e698fb4f;hp=0000000000000000000000000000000000000000;hpb=befc67bc91691a8ee10b9696d61ea3bb49e5b3d0;p=perl%2Fmodules%2FCPANPLUS-Dist-Gentoo.git diff --git a/t/13-maps-license.t b/t/13-maps-license.t new file mode 100644 index 0000000..0a19d00 --- /dev/null +++ b/t/13-maps-license.t @@ -0,0 +1,18 @@ +#!perl -T + +use strict; +use warnings; + +use Test::More tests => 4; + +use CPANPLUS::Dist::Gentoo::Maps; + +sub check_licenses { + my @licenses = CPANPLUS::Dist::Gentoo::Maps::license_c2g(@{$_[0]}); + is_deeply \@licenses, $_[1], $_[2]; +} + +check_licenses [ 'woo' ], [ ], 'nonexistent'; +check_licenses [ 'perl' ], [ qw/Artistic GPL-2/ ], 'perl'; +check_licenses [ qw/perl gpl2/ ], [ qw/Artistic GPL-2/ ], 'perl + gpl2'; +check_licenses [ qw/perl bsd/ ], [ qw/Artistic GPL-2 BSD/ ], 'perl + bsd';