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

Get tests working on VMS #278

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions t/modules/Plugin/SRand.t
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,8 @@ sub intercept_2(&) {
}

{
local %ENV = %ENV;
$ENV{HARNESS_IS_VERBOSE} = 1;
$ENV{T2_RAND_SEED} = 1234;
local $ENV{HARNESS_IS_VERBOSE} = 1;
local $ENV{T2_RAND_SEED} = 1234;

my ($events, $warning);
my $reseed_qr = qr/SRand loaded multiple times, re-seeding rand/;
Expand Down
3 changes: 1 addition & 2 deletions t/modules/Require/AuthorTesting.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
use Test2::Bundle::Extended -target => 'Test2::Require::AuthorTesting';

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

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

{
local %ENV = %ENV;
$ENV{FOO} = 0;
local $ENV{FOO} = 0;
is($CLASS->skip('FOO'), 'This test only runs if the $FOO environment variable is set', "will skip");

$ENV{FOO} = 1;
Expand Down
6 changes: 3 additions & 3 deletions t/modules/Tools/GenTemp.t
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ ok($tmp, "Got a temp dir ($tmp)");

ok(-d File::Spec->canonpath($_), "Created dir $_") for (
$tmp,
"$tmp/subdir",
"$tmp/subdir/nested",
File::Spec->catdir($tmp, 'subdir'),
File::Spec->catdir($tmp, 'subdir', 'nested'),
);

for my $file (qw{foo bar subdir/baz subdir/nested/bat}) {
my $cp = File::Spec->canonpath("$tmp/$file");
my $cp = File::Spec->catfile($tmp, $file);
ok(-f $cp, "Created file $file");
open(my $fh, '<', $cp) or die "Could not open file '$cp': $!";
my $content = $file;
Expand Down