Skip to content

Commit

Permalink
Implement skip-rest()
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Sep 15, 2016
1 parent 1eb0419 commit f104d83
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Test.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,13 @@ sub todo($desc, $count = 1) is export {
@Testers[0].todo: "# TODO $desc.subst(:g, '#', '\\#')", $count;
}

sub skip-rest($desc = '<unknown>') is export {
with @Testers[0] {
die "A plan is required in order to use skip-rest" if .no-plan;
skip $desc, .planned - .tests-run;
}
}

class Tester {
has int $.die-on-fail = ?%*ENV<PERL6_TEST_DIE_ON_FAIL>;
has int $.failed = 0;
Expand Down Expand Up @@ -417,7 +424,7 @@ sub exgo ($expected, $got) {
* Die on failures
* Alter output handler

Routines in category: βœ“`plan`, βœ“`done-testing`, βœ“`skip`, `skip-rest`,
Routines in category: βœ“`plan`, βœ“`done-testing`, βœ“`skip`, βœ“`skip-rest`,
`bailout`, `output`, `failure-output`, `todo-output`

Env vars in category: `PERL6_TEST_DIE_ON_FAIL`
Expand Down

0 comments on commit f104d83

Please sign in to comment.