Skip to content
This repository was archived by the owner on Aug 4, 2024. It is now read-only.

Commit 5d7ced9

Browse files
authored
Merge pull request #296 from craigberry/master
Some test portability fixes
2 parents ffd8488 + 2c4f6f6 commit 5d7ced9

5 files changed

+11
-8
lines changed

t/modules/Require/AutomatedTesting.t

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use Test2::Bundle::Extended -target => 'Test2::Require::AutomatedTesting';
22

33
{
4-
local %ENV = %ENV;
5-
$ENV{AUTOMATED_TESTING} = 0;
4+
local $ENV{AUTOMATED_TESTING} = 0;
65
is($CLASS->skip(), 'Automated test, set the $AUTOMATED_TESTING environment variable to run it', "will skip");
76

87
$ENV{AUTOMATED_TESTING} = 1;

t/modules/Require/ExtendedTesting.t

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use Test2::Bundle::Extended -target => 'Test2::Require::ExtendedTesting';
22

33
{
4-
local %ENV = %ENV;
5-
$ENV{EXTENDED_TESTING} = 0;
4+
local $ENV{EXTENDED_TESTING} = 0;
65
is($CLASS->skip(), 'Extended test, set the $EXTENDED_TESTING environment variable to run it', "will skip");
76

87
$ENV{EXTENDED_TESTING} = 1;

t/modules/Require/NonInteractiveTesting.t

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use Test2::Bundle::Extended -target => 'Test2::Require::NonInteractiveTesting';
22

33
{
4-
local %ENV = %ENV;
5-
$ENV{NONINTERACTIVE_TESTING} = 0;
4+
local $ENV{NONINTERACTIVE_TESTING} = 0;
65
is($CLASS->skip(), 'NonInteractive test, set the $NONINTERACTIVE_TESTING environment variable to run it', "will skip");
76

87
$ENV{NONINTERACTIVE_TESTING} = 1;

t/modules/Require/ReleaseTesting.t

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
use Test2::Bundle::Extended -target => 'Test2::Require::ReleaseTesting';
22

33
{
4-
local %ENV = %ENV;
5-
$ENV{RELEASE_TESTING} = 0;
4+
local $ENV{RELEASE_TESTING} = 0;
65
is($CLASS->skip(), 'Release test, set the $RELEASE_TESTING environment variable to run it', "will skip");
76

87
$ENV{RELEASE_TESTING} = 1;

t/regression/291-async-subtest-done-testing.t

+7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
use Test2::V0;
2+
3+
BEGIN {
4+
require Config;
5+
skip_all('no fork')
6+
unless ($Config::Config{d_fork} or $Config::Config{d_pseudofork});
7+
}
8+
29
use Test2::Tools::AsyncSubtest qw/fork_subtest/;
310

411
my $st = fork_subtest foo => sub {

0 commit comments

Comments
 (0)