xref: /openbsd-src/gnu/usr.bin/perl/cpan/CPAN/t/11mirroredby.t (revision 898184e3e61f9129feb5978fad5a8c6865f00b92)
1#!/usr/bin/perl -w
2
3BEGIN {
4    if ($ENV{PERL_CORE}) {
5        chdir 't' if -d 't';
6        unshift @INC, '../lib';
7    }
8}
9
10use strict;
11use lib "BUNDLE";
12use Test::More tests => 6;
13
14use_ok( 'CPAN::FirstTime' );
15can_ok( 'CPAN::Mirrored::By', 'new', 'continent', 'country', 'url' );
16my $cmb = CPAN::Mirrored::By->new(
17  {
18    continent => "continent",
19    country => "country",
20    http => "http",
21    ftp => "ftp",
22  }
23);
24isa_ok( $cmb, 'CPAN::Mirrored::By' );
25
26is( $cmb->continent(), 'continent',
27    'continent() should return continent entry' );
28is( $cmb->country(), 'country', 'country() should return country entry' );
29is( $cmb->url(), 'http', 'url() should return best url entry' );
30
31__END__
32# Local Variables:
33# mode: cperl
34# cperl-indent-level: 4
35# End:
36