Browse Source
Calls to VERSION were generating errors when called on a string. Use a bit of sleight of hand to avoid this Added a couple of tests on Installer/PerlModules Module needs better coverage testing (esp on newer perls) Sorted to list of modules to make koha_perl_deps.pl more human-friendly Signed-off-by: Galen Charlton <gmcharlt@gmail.com>3.2.x
Colin Campbell
14 years ago
committed by
Galen Charlton
2 changed files with 31 additions and 5 deletions
@ -0,0 +1,25 @@ |
|||
#!/usr/bin/perl |
|||
# |
|||
use strict; |
|||
use warnings; |
|||
|
|||
use Test::More tests => 4; |
|||
use Data::Dumper; |
|||
|
|||
BEGIN { |
|||
use_ok('C4::Installer::PerlModules'); |
|||
} |
|||
|
|||
my $obj = C4::Installer::PerlModules->new; |
|||
|
|||
isa_ok($obj,'C4::Installer::PerlModules'); |
|||
|
|||
my $hash_ref = $obj->version_info(module => 'Test::More'); |
|||
|
|||
my $control = $Test::More::VERSION; |
|||
|
|||
like($hash_ref->{'Test::More'}->{cur_ver}, qr/\d/, 'returns numeric version'); |
|||
|
|||
ok($hash_ref->{'Test::More'}->{cur_ver} == $control, 'returns correct version'); |
|||
|
|||
|
Loading…
Reference in new issue