Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /usr/share/doc/perl-Test-Simple/t/regression/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/doc/perl-Test-Simple/t/regression/684-nested_todo_diag.t
use Test::More;
use strict;
use warnings;

use Test2::API qw/intercept/;
my @events;

intercept {
    local $TODO = "broken";

    Test2::API::test2_stack->top->listen(sub { push @events => $_[1] }, inherit => 1);

    subtest foo => sub {
        subtest bar => sub {
            ok(0, 'oops');
        };
    };
};

my ($event) = grep { $_->trace->line == 16 && ref($_) eq 'Test::Builder::TodoDiag'} @events;
ok($event, "nested todo diag on line 16 was changed to TodoDiag (STDOUT instead of STDERR)");

done_testing;

Spamworldpro Mini