Skip to content

Commit 2da02c2

Browse files
gracefully allow for EXTENDED_TESTING=1 and some missing optional prereqs
e.g. see https://www.cpantesters.org/cpan/report/6800d7ec-94c3-11ec-a671-b6b0e4f4888b
1 parent aaa47cd commit 2da02c2

3 files changed

+30
-3
lines changed

t/zzz-acceptance-draft2019-09-format.t

+10-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ no if "$]" >= 5.033006, feature => 'bareword_filehandles';
1010
use open ':std', ':encoding(UTF-8)'; # force stdin, stdout, stderr into utf8
1111

1212
use Test::More;
13+
use Test::Needs;
1314
use List::Util 1.50 'head';
1415
use lib 't/lib';
1516
use Acceptance;
@@ -22,7 +23,15 @@ BEGIN {
2223
if not -d '.git' and not grep $ENV{$_}, @variables;
2324
}
2425

25-
if (-d '.git' or $ENV{AUTHOR_TESTING} or $ENV{EXTENDED_TESTING}) {
26+
if ($ENV{EXTENDED_TESTING}) {
27+
test_needs 'Time::Moment';
28+
test_needs 'DateTime::Format::RFC3339';
29+
test_needs 'Email::Address::XS', 1.04;
30+
test_needs 'Data::Validate::Domain';
31+
test_needs 'Net::IDN::Encode';
32+
}
33+
34+
if (-d '.git' or $ENV{AUTHOR_TESTING}) {
2635
eval { require Time::Moment; 1 } or fail $@;
2736
eval { require DateTime::Format::RFC3339; 1 } or fail $@;
2837
eval { require Email::Address::XS; Email::Address::XS->VERSION(1.04); 1 } or fail $@;

t/zzz-acceptance-draft2020-12-format.t

+10-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ no if "$]" >= 5.033006, feature => 'bareword_filehandles';
1010
use open ':std', ':encoding(UTF-8)'; # force stdin, stdout, stderr into utf8
1111

1212
use Test::More;
13+
use Test::Needs;
1314
use List::Util 1.50 'head';
1415
use lib 't/lib';
1516
use Acceptance;
@@ -22,7 +23,15 @@ BEGIN {
2223
if not -d '.git' and not grep $ENV{$_}, @variables;
2324
}
2425

25-
if (-d '.git' or $ENV{AUTHOR_TESTING} or $ENV{EXTENDED_TESTING}) {
26+
if ($ENV{EXTENDED_TESTING}) {
27+
test_needs 'Time::Moment';
28+
test_needs 'DateTime::Format::RFC3339';
29+
test_needs 'Email::Address::XS', 1.04;
30+
test_needs 'Data::Validate::Domain';
31+
test_needs 'Net::IDN::Encode';
32+
}
33+
34+
if (-d '.git' or $ENV{AUTHOR_TESTING}) {
2635
eval { require Time::Moment; 1 } or fail $@;
2736
eval { require DateTime::Format::RFC3339; 1 } or fail $@;
2837
eval { require Email::Address::XS; Email::Address::XS->VERSION(1.04); 1 } or fail $@;

t/zzz-acceptance-draft7-format.t

+10-1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ no if "$]" >= 5.033006, feature => 'bareword_filehandles';
1010
use open ':std', ':encoding(UTF-8)'; # force stdin, stdout, stderr into utf8
1111

1212
use Test::More;
13+
use Test::Needs;
1314
use List::Util 1.50 'head';
1415
use lib 't/lib';
1516
use Acceptance;
@@ -22,7 +23,15 @@ BEGIN {
2223
if not -d '.git' and not grep $ENV{$_}, @variables;
2324
}
2425

25-
if (-d '.git' or $ENV{AUTHOR_TESTING} or $ENV{EXTENDED_TESTING}) {
26+
if ($ENV{EXTENDED_TESTING}) {
27+
test_needs 'Time::Moment';
28+
test_needs 'DateTime::Format::RFC3339';
29+
test_needs 'Email::Address::XS', 1.04;
30+
test_needs 'Data::Validate::Domain';
31+
test_needs 'Net::IDN::Encode';
32+
}
33+
34+
if (-d '.git' or $ENV{AUTHOR_TESTING}) {
2635
eval { require Time::Moment; 1 } or fail $@;
2736
eval { require DateTime::Format::RFC3339; 1 } or fail $@;
2837
eval { require Email::Address::XS; Email::Address::XS->VERSION(1.04); 1 } or fail $@;

0 commit comments

Comments
 (0)