Skip to content

Commit

Permalink
Added tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bingos committed May 15, 2011
1 parent 7cb5de0 commit c722e6b
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dist.ini
Expand Up @@ -6,8 +6,8 @@ copyright_holder = Chris Williams


[@BINGOS] [@BINGOS]


[Prereq / BuildRequires] [Prereqs / BuildRequires]
Test::More = 0.47 Test::More = 0.47


[Prereq] [Prereqs]
perl = v5.6.0 perl = v5.6.0
31 changes: 31 additions & 0 deletions t/01-releases.t
@@ -0,0 +1,31 @@
use strict;
use warnings;
use Test::More qw[no_plan];
use CPAN::Perl::Releases qw[perl_tarballs];

my $perl = '5.14.0';

my $expected = {
"tar.bz2" => "J/JE/JESSE/perl-5.14.0.tar.bz2",
"tar.gz" => "J/JE/JESSE/perl-5.14.0.tar.gz"
};

{
my $got = perl_tarballs( $perl );
is_deeply( $got, $expected, 'Imported function' );
}

{
my $got = CPAN::Perl::Releases::perl_tarballs( $perl );
is_deeply( $got, $expected, 'Package Function' );
}

{
my $got = CPAN::Perl::Releases->perl_tarballs( $perl );
is_deeply( $got, $expected, 'Class method' );
}

{
my $got = perl_tarballs( '6.0.0' );
ok( !$got, 'Should not have this release' );
}

0 comments on commit c722e6b

Please sign in to comment.