cxw42 / cxw42/Test-OnlySome

Permit skipping within a block of more than one test

Open
#9 0 comments 0 reactions 0 assignees View on GitHub
enhancement long-term
Dominant language
Perl
Stars
0
Forks
1
PR merge metrics
No merged PRs in 30d

Description

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:
- [x] 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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.