From: Andreas König Date: Mon, 20 May 2002 05:36:14 +0000 (+0200) Subject: Re: [PATCH mirroredby.t] Tests for CPAN::Mirrored::By X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d93d2cac158073b5f64458507d122ca0aa8e3fcb;p=p5sagit%2Fp5-mst-13.2.git Re: [PATCH mirroredby.t] Tests for CPAN::Mirrored::By Message-ID: p4raw-id: //depot/perl@16703 --- diff --git a/MANIFEST b/MANIFEST index 576dd73..8887c40 100644 --- a/MANIFEST +++ b/MANIFEST @@ -985,6 +985,7 @@ lib/CPAN.pm Interface to Comprehensive Perl Archive Network lib/CPAN/FirstTime.pm Utility for creating CPAN config files lib/CPAN/Nox.pm Runs CPAN while avoiding compiled extensions lib/CPAN/t/loadme.t See if CPAN the module works +lib/CPAN/t/mirroredby.t See if CPAN::Mirrored::By works lib/CPAN/t/Nox.t See if CPAN::Nox works lib/CPAN/t/vcmp.t See if CPAN the module works lib/ctime.pl A ctime workalike diff --git a/lib/CPAN/t/mirroredby.t b/lib/CPAN/t/mirroredby.t new file mode 100644 index 0000000..91bd396 --- /dev/null +++ b/lib/CPAN/t/mirroredby.t @@ -0,0 +1,22 @@ +#!/usr/bin/perl -w + +BEGIN { + if ($ENV{PERL_CORE}) { + chdir 't' if -d 't'; + unshift @INC, '../lib'; + } +} + +use strict; +use Test::More tests => 6; + +use_ok( 'CPAN::FirstTime' ); +can_ok( 'CPAN::Mirrored::By', 'new', 'continent', 'country', 'url' ); +my $cmb = CPAN::Mirrored::By->new(); +isa_ok( $cmb, 'CPAN::Mirrored::By' ); + +@$cmb = qw( continent country url ); +is( $cmb->continent(), 'continent', + 'continent() should return continent entry' ); +is( $cmb->country(), 'country', 'country() should return country entry' ); +is( $cmb->url(), 'url', 'url() should return url entry' );