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 #278 from Test-More/vms-fixes
Browse files Browse the repository at this point in the history
Get tests working on VMS
  • Loading branch information
exodist authored Oct 23, 2023
2 parents c9e6d45 + 29d2dec commit 22fe1cd
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
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

0 comments on commit 22fe1cd

Please sign in to comment.