Skip to content

skip_all doesn't work inside a : Test sub #10

@JRaspass

Description

@JRaspass
subtest foo => sub {
    skip_all 'because reasons';

    pass;
};
ok 1 - foo {
    1..0 # SKIP because reasons
}
sub foo : Test {
    skip_all 'because reasons';

    pass;
}
not ok 1 - foo {
    1..0 # SKIP because reasons
}
    # Label not found for "last T2_SUBTEST_WRAPPER" at /home/jraspass/perl5/perlbrew/perls/perl-5.37.9/lib/5.37.9/Test2/Hub/Subtest.pm line 67.

I can't use : Skip because the skip condition is dynamic. skip with an explicit count inside a labeled block works but that's a bit crappy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions