Lines 288-301
subtest 'output and output_html tests' => sub {
Link Here
|
288 |
|
288 |
|
289 |
subtest 'Test _version_compare' => sub { |
289 |
subtest 'Test _version_compare' => sub { |
290 |
|
290 |
|
291 |
plan tests => 6; |
291 |
plan tests => 12; |
|
|
292 |
|
293 |
is( Koha::Plugins::Base::_version_compare( '1.1.1', '2.2.2' ), -1, "1.1.1 is less then 2.2.2" ); |
294 |
is( Koha::Plugins::Base::_version_compare( '2.2.2', '1.1.1' ), 1, "1.1.1 is greater then 2.2.2" ); |
295 |
is( Koha::Plugins::Base::_version_compare( '1.1.1', '1.1.1' ), 0, "1.1.1 is equal to 1.1.1" ); |
296 |
is( Koha::Plugins::Base::_version_compare( '1.01.001', '1.1.1' ), 0, "1.01.001 is equal to 1.1.1" ); |
297 |
is( Koha::Plugins::Base::_version_compare( '1', '1.0.0' ), 0, "1 is equal to 1.0.0" ); |
298 |
is( Koha::Plugins::Base::_version_compare( '1.0', '1.0.0' ), 0, "1.0 is equal to 1.0.0" ); |
292 |
|
299 |
|
293 |
is( Koha::Plugins::Base::_version_compare( '1.1.1', '2.2.2' ), -1, "1.1.1 is less then 2.2.2" ); |
300 |
# OO tests |
294 |
is( Koha::Plugins::Base::_version_compare( '2.2.2', '1.1.1' ), 1, "1.1.1 is greater then 2.2.2" ); |
301 |
my $plugin = Koha::Plugin::Test->new; |
295 |
is( Koha::Plugins::Base::_version_compare( '1.1.1', '1.1.1' ), 0, "1.1.1 is equal to 1.1.1" ); |
302 |
is( $plugin->_version_compare( '1.1.1', '2.2.2' ), -1, "1.1.1 is less then 2.2.2" ); |
296 |
is( Koha::Plugins::Base::_version_compare( '1.01.001', '1.1.1' ), 0, "1.01.001 is equal to 1.1.1" ); |
303 |
is( $plugin->_version_compare( '2.2.2', '1.1.1' ), 1, "1.1.1 is greater then 2.2.2" ); |
297 |
is( Koha::Plugins::Base::_version_compare( '1', '1.0.0' ), 0, "1 is equal to 1.0.0" ); |
304 |
is( $plugin->_version_compare( '1.1.1', '1.1.1' ), 0, "1.1.1 is equal to 1.1.1" ); |
298 |
is( Koha::Plugins::Base::_version_compare( '1.0', '1.0.0' ), 0, "1.0 is equal to 1.0.0" ); |
305 |
is( $plugin->_version_compare( '1.01.001', '1.1.1' ), 0, "1.01.001 is equal to 1.1.1" ); |
|
|
306 |
is( $plugin->_version_compare( '1', '1.0.0' ), 0, "1 is equal to 1.0.0" ); |
307 |
is( $plugin->_version_compare( '1.0', '1.0.0' ), 0, "1.0 is equal to 1.0.0" ); |
299 |
}; |
308 |
}; |
300 |
|
309 |
|
301 |
subtest 'bundle_path() tests' => sub { |
310 |
subtest 'bundle_path() tests' => sub { |
302 |
- |
|
|