| File: | t/Installer_pm.t |
| Coverage: | 100.0% |
| line | stmt | bran | cond | sub | time | code |
|---|---|---|---|---|---|---|
| 1 | #!/usr/bin/perl | |||||
| 2 | # | |||||
| 3 | 1 1 1 | 1.33283528083069e+15 2 26 | use strict; | |||
| 4 | 1 1 1 | 5 1 38 | use warnings; | |||
| 5 | ||||||
| 6 | 1 1 1 | 137 23661 16 | use Test::More tests => 4; | |||
| 7 | 1 1 1 | 1804 2 66 | use Data::Dumper; | |||
| 8 | ||||||
| 9 | BEGIN { | |||||
| 10 | 1 | 9 | use_ok('C4::Installer::PerlModules'); | |||
| 11 | } | |||||
| 12 | ||||||
| 13 | 1 | 221046 | my $obj = C4::Installer::PerlModules->new; | |||
| 14 | ||||||
| 15 | 1 | 27 | isa_ok($obj,'C4::Installer::PerlModules'); | |||
| 16 | ||||||
| 17 | 1 | 904 | my $hash_ref = $obj->version_info(module => 'Test::More'); | |||
| 18 | ||||||
| 19 | 1 | 3 | my $control = $Test::More::VERSION; | |||
| 20 | ||||||
| 21 | 1 | 13 | like($hash_ref->{'Test::More'}->{cur_ver}, qr/\d/, 'returns numeric version'); | |||
| 22 | ||||||
| 23 | 1 | 630 | ok($hash_ref->{'Test::More'}->{cur_ver} == $control, 'returns correct version'); | |||
| 24 | ||||||
| 25 | ||||||