Skip to content

Permit skipping within a block of more than one test #9

@cxw42

Description

@cxw42

In the code os 2 { ok(1); ok(0); }, the whole block is currently (as of v0.0.8) skipped based on the skip of the ok(1). As a result, when you use T::OS::RerunFailed, the ok(0) will be skipped based on the ok(1)'s having succeeded. Is there a way to fix this?

Edit First improvement:

  • Run all the tests in the block if any is unskipped. This at least maintains the principle of least surprise. Some tests might run you didn't expect would, but none will be skipped without your expressly saying so.

Other alternatives

Another way would be to take Block+ and require each Block to be one test. However, that complicates lexical scoping.

A third way would be to require special markers between the tests in a block, and transform the source accordingly.

A fourth way would be to support only specific test calls within the block, and transform the source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlong-termItems that may take a while to resolve

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions