Koha/t/Installer_pm.t
Colin Campbell 6a1191bb3f Bug 4905 Runtime errors in about.pl
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>
2010-06-24 14:16:36 -04:00

25 lines
492 B
Perl
Executable file

#!/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');