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

Commit

Permalink
Merge pull request #296 from craigberry/master
Browse files Browse the repository at this point in the history
Some test portability fixes
  • Loading branch information
exodist authored Aug 4, 2024
2 parents ffd8488 + 2c4f6f6 commit 5d7ced9
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
3 changes: 1 addition & 2 deletions t/modules/Require/AutomatedTesting.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use Test2::Bundle::Extended -target => 'Test2::Require::AutomatedTesting';

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

$ENV{AUTOMATED_TESTING} = 1;
Expand Down
3 changes: 1 addition & 2 deletions t/modules/Require/ExtendedTesting.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use Test2::Bundle::Extended -target => 'Test2::Require::ExtendedTesting';

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

$ENV{EXTENDED_TESTING} = 1;
Expand Down
3 changes: 1 addition & 2 deletions t/modules/Require/NonInteractiveTesting.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use Test2::Bundle::Extended -target => 'Test2::Require::NonInteractiveTesting';

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

$ENV{NONINTERACTIVE_TESTING} = 1;
Expand Down
3 changes: 1 addition & 2 deletions t/modules/Require/ReleaseTesting.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use Test2::Bundle::Extended -target => 'Test2::Require::ReleaseTesting';

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

$ENV{RELEASE_TESTING} = 1;
Expand Down
7 changes: 7 additions & 0 deletions t/regression/291-async-subtest-done-testing.t
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
use Test2::V0;

BEGIN {
require Config;
skip_all('no fork')
unless ($Config::Config{d_fork} or $Config::Config{d_pseudofork});
}

use Test2::Tools::AsyncSubtest qw/fork_subtest/;

my $st = fork_subtest foo => sub {
Expand Down

0 comments on commit 5d7ced9

Please sign in to comment.