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

Commit

Permalink
Avoid list assignment to %ENV
Browse files Browse the repository at this point in the history
It's not portable and isn't needed here, where we only want to
override a single element.
  • Loading branch information
craigberry committed Aug 4, 2024
1 parent 0ced3fb commit 2c4f6f6
Show file tree
Hide file tree
Showing 4 changed files with 4 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

0 comments on commit 2c4f6f6

Please sign in to comment.