Skip to content

Commit

Permalink
use AUTHOR_TESTING instead of RELEASE_TESTING
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed May 15, 2024
1 parent 64f75cb commit dd356c9
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 39 deletions.
16 changes: 8 additions & 8 deletions t/gv.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ use warnings;

use Test::Most;

if(not $ENV{RELEASE_TESTING}) {
plan(skip_all => 'Author tests not required for installation');
}

eval "use Test::GreaterVersion";
if($ENV{AUTHOR_TESTING}) {
eval 'use Test::GreaterVersion';

plan skip_all => "Test::GreaterVersion required for checking versions" if $@;
plan(skip_all => 'Test::GreaterVersion required for checking versions') if $@;

Test::GreaterVersion::has_greater_version_than_cpan('Geo::Coder::List');
Test::GreaterVersion::has_greater_version_than_cpan('Geo::Coder::List');

done_testing();
done_testing();
} else {
plan(skip_all => 'Author tests not required for installation');
}
18 changes: 10 additions & 8 deletions t/kwalitee.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ use warnings;

use Test::Most;

unless($ENV{RELEASE_TESTING}) {
plan( skip_all => "Author tests not required for installation" );
}

eval { require Test::Kwalitee; Test::Kwalitee->import(); };
if($ENV{AUTHOR_TESTING}) {
eval "use Test::Kwalitee tests => [ qw( -has_meta_yml ) ]";

plan( skip_all => 'Test::Kwalitee not installed; skipping' ) if $@;

unlink 'Debian_CPANTS.txt' if -e 'Debian_CPANTS.txt';
if($@) {
plan(skip_all => 'Test::Kwalitee not installed; skipping') if $@;
} else {
unlink('Debian_CPANTS.txt') if -e 'Debian_CPANTS.txt';
}
} else {
plan(skip_all => 'Author tests not required for installation');
}
8 changes: 4 additions & 4 deletions t/manifest.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ use strict;
use warnings;
use Test::Most;

unless ( $ENV{RELEASE_TESTING} ) {
plan( skip_all => "Author tests not required for installation" );
unless($ENV{AUTHOR_TESTING}) {
plan(skip_all => 'Author tests not required for installation');
}

eval "use Test::CheckManifest 0.9";
plan skip_all => "Test::CheckManifest 0.9 required" if $@;
ok_manifest({ filter => [qr/.git/] });
plan(skip_all => 'Test::CheckManifest 0.9 required') if $@;
ok_manifest({ filter => [qr/(\.git)|(\..+\.yml$)/] });
15 changes: 8 additions & 7 deletions t/noplan.t
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ use warnings;

use Test::Most;

unless($ENV{RELEASE_TESTING}) {
plan( skip_all => "Author tests not required for installation" );
}
if($ENV{'AUTHOR_TESTING'}) {
eval 'use Test::NoPlan qw / all_plans_ok /';

eval 'use Test::NoPlan qw / all_plans_ok /';
if($@) {
plan skip_all => 'Test::NoPlan required for test verification';
if($@) {
plan(skip_all => 'Test::NoPlan required for test verification');
} else {
all_plans_ok();
}
} else {
all_plans_ok();
plan(skip_all => 'Author tests not required for installation');
}
22 changes: 12 additions & 10 deletions t/unused.t
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@ use strict;
use warnings;
use Test::Most;

unless($ENV{RELEASE_TESTING}) {
plan(skip_all => "Author tests not required for installation");
}

eval 'use warnings::unused -global';
if($@ || ($warnings::unused::VERSION < 0.04)) {
plan(skip_all => 'warnings::unused >= 0.04 needed for testing');
if($ENV{AUTHOR_TESTING}) {
eval {
eval 'use warnings::unused 0.04';
};
if($@) {
plan(skip_all => 'warnings::unused needed for test for unused variables');
} else {
use_ok('Geo::Coder::List');
new_ok('Geo::Coder::List');
plan(tests => 2);
}
} else {
use_ok('Geo::Coder::List');
new_ok('Geo::Coder::List');
plan tests => 2;
plan(skip_all => 'Author tests not required for installation');
}
4 changes: 2 additions & 2 deletions t/used.t
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
use strict;
use Test::Most;

unless($ENV{RELEASE_TESTING}) {
plan(skip_all => "Author tests not required for installation");
unless($ENV{'AUTHOR_TESTING'}) {
plan(skip_all => 'Author tests not required for installation');
}

eval 'use Test::Module::Used';
Expand Down

0 comments on commit dd356c9

Please sign in to comment.