Lines 6-17
Link Here
|
6 |
use strict; |
6 |
use strict; |
7 |
use warnings; |
7 |
use warnings; |
8 |
|
8 |
|
9 |
use Test::More tests => 17; |
9 |
use Test::More tests => 19; |
10 |
|
10 |
|
11 |
BEGIN { |
11 |
BEGIN { |
12 |
use_ok('C4::Installer::PerlModules'); |
12 |
use_ok('C4::Installer::PerlModules'); |
13 |
} |
13 |
} |
14 |
|
14 |
|
|
|
15 |
$C4::Installer::PerlModules::PERL_DEPS->{'Local::Module::Sort'} = { |
16 |
'required' => '1', |
17 |
'min_ver' => '0.9.3', |
18 |
'usage' => "Testing: make sure numbers are compared numerically and not lexicographically", |
19 |
}; |
20 |
|
21 |
$Local::Module::Sort::VERSION = '0.9.13'; |
22 |
$INC{"Local/Module/Sort.pm"} = 1; |
23 |
use_ok("Local::Module::Sort"); |
24 |
|
15 |
my $modules; |
25 |
my $modules; |
16 |
ok ($modules = C4::Installer::PerlModules->new(), 'Tests modules object'); |
26 |
ok ($modules = C4::Installer::PerlModules->new(), 'Tests modules object'); |
17 |
my $prereq_pm = $modules->prereq_pm(); |
27 |
my $prereq_pm = $modules->prereq_pm(); |
Lines 37-39
my @module_list = $modules->module_list;
Link Here
|
37 |
ok (exists($params{"DBI"}), 'DBI exists in array'); |
47 |
ok (exists($params{"DBI"}), 'DBI exists in array'); |
38 |
is ($modules->required('module'=>"String::Random"),1, 'String::Random should return 1 since required'); |
48 |
is ($modules->required('module'=>"String::Random"),1, 'String::Random should return 1 since required'); |
39 |
ok (!$modules->version_info(), "Testing empty modules"); |
49 |
ok (!$modules->version_info(), "Testing empty modules"); |
40 |
- |
50 |
|
|
|
51 |
is($modules->version_info('module'=>"Local::Module::Sort")->{"Local::Module::Sort"}->{"upgrade"},0,"Version 0.9.13 is greater than 0.9.3, so no upgrade needed"); |