~ubuntu-branches/ubuntu/edgy/libmodule-info-perl/edgy

« back to all changes in this revision

Viewing changes to t/n1_modules_required.t

  • Committer: Bazaar Package Importer
  • Author(s): Jay Bonci
  • Date: 2003-10-06 10:51:04 UTC
  • Revision ID: james.westby@ubuntu.com-20031006105104-1b67d55zyyay6jvo
Tags: upstream-0.24
ImportĀ upstreamĀ versionĀ 0.24

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl -w
 
2
 
 
3
use strict;
 
4
use lib 't/lib';
 
5
use Test::More tests => 3;
 
6
use Module::Info;
 
7
 
 
8
my $bar = Module::Info->new_from_module( 'Bar' );
 
9
 
 
10
SKIP: {
 
11
    skip "Only works on 5.6.1 and up.", 4 unless $] >= 5.006001;
 
12
 
 
13
    my %mods = $bar->modules_required;
 
14
    is_deeply( [ sort keys %mods ], [ sort qw(Cwd strict Carp) ],
 
15
               "Got the correct modules" );
 
16
 
 
17
    is_deeply( [ sort @{$mods{Cwd}} ], [ sort qw(1 1.00102 v1.1.2) ],
 
18
               "Got the correct versions when speficied" );
 
19
 
 
20
    is_deeply( [], $mods{strict},
 
21
               "Got no version when not specified" );
 
22
}