Skip to content

Commit

Permalink
Use Test::Needs
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Feb 4, 2024
1 parent 16bbf08 commit ed6075f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 23 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
Revision history for CGI-Info

0.81
Use Test::Needs

0.80 Fri Jan 19 08:05:29 EST 2024
Added documentroot() as a synonym to rootdir()
For compatability with Apache
Expand Down
4 changes: 2 additions & 2 deletions t/dependent-modules.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
use strict;
use warnings;

use Test::Needs qw(Test::DependentModules);
use Test::DependentModules qw(test_modules);
use Test::Needs 'Test::DependentModules';
use Test::DependentModules 'test_modules';
use Test::Most;

my @modules = ('CGI::Lingua');
Expand Down
16 changes: 5 additions & 11 deletions t/eof.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,14 @@

use strict;
use warnings;
use Test::Needs 'Test::EOF';
use Test::Most;

BEGIN {
if($ENV{AUTHOR_TESTING}) {
eval {
require Test::EOF;
};
if($@) {
plan(skip_all => 'Test::EOF not installed');
} else {
import Test::EOF;
all_perl_files_ok({ minimum_newlines => 1, maximum_newlines => 4 });
done_testing();
}
if($ENV{'AUTHOR_TESTING'}) {
Test::EOF->import();
all_perl_files_ok({ minimum_newlines => 1, maximum_newlines => 4 });
done_testing();
} else {
plan(skip_all => 'Author tests not required for installation');
}
Expand Down
14 changes: 4 additions & 10 deletions t/eol.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,13 @@

use strict;
use warnings;
use Test::Needs 'Test::EOL';
use Test::Most;

BEGIN {
if($ENV{AUTHOR_TESTING}) {
eval {
require Test::EOL;
};
if($@) {
plan(skip_all => 'Test::EOL not installed');
} else {
import Test::EOL;
all_perl_files_ok({ trailing_whitespace => 1 });
}
if($ENV{'AUTHOR_TESTING'}) {
Test::EOL->import();
all_perl_files_ok({ trailing_whitespace => 1 });
} else {
plan(skip_all => 'Author tests not required for installation');
}
Expand Down

0 comments on commit ed6075f

Please sign in to comment.