Skip to content

Commit

Permalink
Some portability fixes for Test2::Suite tests
Browse files Browse the repository at this point in the history
Also sent upstream: Test-More/Test2-Suite#296
  • Loading branch information
craigberry committed Aug 4, 2024
1 parent 42365d0 commit 24f889c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 14 deletions.
8 changes: 8 additions & 0 deletions Porting/Maintainers.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,14 @@ package Maintainers;
# https://github.com/Test-More/Test2-Suite/issues/208
't/acceptance/Workflow-Acceptance.t',
],
'CUSTOMIZED' => [
# https://github.com/Test-More/Test2-Suite/pull/296
't/modules/Require/AutomatedTesting.t',
't/modules/Require/ExtendedTesting.t',
't/modules/Require/NonInteractiveTesting.t',
't/modules/Require/ReleaseTesting.t',
't/regression/291-async-subtest-done-testing.t',
],
},

'Text::Abbrev' => {
Expand Down
3 changes: 1 addition & 2 deletions cpan/Test2-Suite/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 cpan/Test2-Suite/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 cpan/Test2-Suite/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 cpan/Test2-Suite/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
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
11 changes: 5 additions & 6 deletions t/porting/customized.dat
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ MIME::Base64 cpan/MIME-Base64/lib/MIME/Base64.pm 18e38d197c7c83f96b24f48bef514e9
MIME::Base64 cpan/MIME-Base64/lib/MIME/QuotedPrint.pm 36cbb455ab57b9bbca7e86f50987c8b1df1a8122
Pod::Perldoc cpan/Pod-Perldoc/lib/Pod/Perldoc.pm 582be34c077c9ff44d99914724a0cc2140bcd48c
Scalar::Util cpan/Scalar-List-Utils/t/uniqnum.t 553b0df79a084015b39e4ae9774f801c9eafeb4c
Test2::Suite cpan/Test2-Suite/t/modules/Require/AutomatedTesting.t 87095a0ad2ef036d95861aad55b2d2118859abc9
Test2::Suite cpan/Test2-Suite/t/modules/Require/ExtendedTesting.t 47f28c9bccf130983827637c42b7026d8f70aa69
Test2::Suite cpan/Test2-Suite/t/modules/Require/NonInteractiveTesting.t 05e6835384ff054d5fa1b2d62b0401c7944a7a52
Test2::Suite cpan/Test2-Suite/t/modules/Require/ReleaseTesting.t 1eb2d643a4ff304131769de79eac3a6525b4fbe0
Test2::Suite cpan/Test2-Suite/t/regression/291-async-subtest-done-testing.t e1d1145da23a2d1bfd9bbe126e9c4d7e5198f259
Time::Piece cpan/Time-Piece/Piece.pm 8cec8b66183ceddb9bf2b6af35dcdd345bc9adfa
Time::Piece cpan/Time-Piece/Piece.xs 543152540ee17788a638b2c5746b86c3d04401d1
Win32API::File cpan/Win32API-File/File.pm 8fd212857f821cb26648878b96e57f13bf21b99e
Win32API::File cpan/Win32API-File/File.xs beb870fed4490d2faa547b4a8576b8d64d1d27c5
podlators cpan/podlators/lib/Pod/Man.pm 830bd4708c735e7ddfc3622c58f005ed68647357
podlators cpan/podlators/lib/Pod/ParseLink.pm ed1b133f2abf739b1d7d480a9c0285a2b7441d6a
podlators cpan/podlators/lib/Pod/Text.pm c454bab685ca35bccdcd8e87bc4a0922f6fc77f7
podlators cpan/podlators/lib/Pod/Text/Color.pm 318662cdfdd07a95be82c3080106ed1d410e18e0
podlators cpan/podlators/lib/Pod/Text/Overstrike.pm ac9e6c6483aa785a4cd9b0ded64130a52e5178c9
podlators cpan/podlators/lib/Pod/Text/Termcap.pm dc5c03b6310febae555202480bdcf8877c16efa8
version cpan/version/lib/version.pm 8080cfe1fb21d5248c8ff5133b298d249d11e8e8

0 comments on commit 24f889c

Please sign in to comment.