in reply to Test::More - Skip following tests if one test fails
Take advantage of the fact that Test::More's ok, like, is, etc functions all return a boolean indicating the test's status.
The two possibilities you should look at are:
If when a test fails, you want to skip *all* the remaining tests in the file do:
like(...) or BAIL_OUT("No point in continuing");
If you just wish to skip three tests and then continue with some more tests in the file:
SKIP: { like(...) or skip "The next three are irrelevant", 3; # the three tests to be skipped here. ok(...); ok(...); ok(...); } # will continue with this test ok(...);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Test::More - Skip following tests if one test fails
by Doozer (Scribe) on Feb 28, 2013 at 12:49 UTC | |
|
Re^2: Test::More - Skip following tests if one test fails
by Edster (Initiate) on May 27, 2014 at 13:29 UTC | |
by tye (Sage) on May 27, 2014 at 15:31 UTC |