Bugzilla – Attachment 59544 Details for
Bug 17986
Perl dependency evaluation incorrect
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17986: Add tests
Bug-17986-Add-tests.patch (text/plain), 2.33 KB, created by
Jonathan Druart
on 2017-01-25 10:34:00 UTC
(
hide
)
Description:
Bug 17986: Add tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-01-25 10:34:00 UTC
Size:
2.33 KB
patch
obsolete
>From 38afcc60cd3a788e6b0a4969134c87d19149bf5a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 25 Jan 2017 11:33:43 +0100 >Subject: [PATCH] Bug 17986: Add tests > >--- > t/Installer_PerlModules.t | 21 +++++++++++++++------ > 1 file changed, 15 insertions(+), 6 deletions(-) > >diff --git a/t/Installer_PerlModules.t b/t/Installer_PerlModules.t >index fafdd48..7301eb2 100755 >--- a/t/Installer_PerlModules.t >+++ b/t/Installer_PerlModules.t >@@ -6,21 +6,29 @@ > use strict; > use warnings; > >-use Test::More tests => 19; >+use Test::More tests => 21; > > BEGIN { > use_ok('C4::Installer::PerlModules'); > } > >-$C4::Installer::PerlModules::PERL_DEPS->{'Local::Module::Sort'} = { >+$C4::Installer::PerlModules::PERL_DEPS->{'Local::Module::Upgraded'} = { > 'required' => '1', > 'min_ver' => '0.9.3', > 'usage' => "Testing: make sure numbers are compared numerically and not lexicographically", > }; >+$Local::Module::Upgraded::VERSION = '0.9.13'; >+$INC{"Local/Module/Upgraded.pm"} = 1; >+use_ok("Local::Module::Upgraded"); > >-$Local::Module::Sort::VERSION = '0.9.13'; >-$INC{"Local/Module/Sort.pm"} = 1; >-use_ok("Local::Module::Sort"); >+$C4::Installer::PerlModules::PERL_DEPS->{'Local::Module::NotUpgraded'} = { >+ 'required' => '1', >+ 'min_ver' => '0.9.3', >+ 'usage' => "Testing: make sure numbers are compared numerically and not lexicographically", >+}; >+$Local::Module::NotUpgraded::VERSION = '0.9.1'; >+$INC{"Local/Module/NotUpgraded.pm"} = 1; >+use_ok("Local::Module::NotUpgraded"); > > my $modules; > ok ($modules = C4::Installer::PerlModules->new(), 'Tests modules object'); >@@ -48,4 +56,5 @@ ok (exists($params{"DBI"}), 'DBI exists in array'); > is ($modules->required('module'=>"String::Random"),1, 'String::Random should return 1 since required'); > ok (!$modules->version_info(), "Testing empty modules"); > >-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"); >+is($modules->version_info('module'=>"Local::Module::Upgraded")->{"Local::Module::Upgraded"}->{"upgrade"},0,"Version 0.9.13 is greater than 0.9.3, so no upgrade needed"); >+is($modules->version_info('module'=>"Local::Module::NotUpgraded")->{"Local::Module::NotUpgraded"}->{"upgrade"},1,"Version 0.9.1 is smaller than 0.9.1, so no upgrade needed"); >-- >2.9.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17986
:
59535
|
59536
|
59538
|
59544
|
59545