@@ -410,6 +410,15 @@ only one test will be marked TODO.
410
410
is my-custom-pi(), pi, 'my-custom-pi'; # Run the test, but don't report
411
411
# failure in test harness.
412
412
413
+ The result from the test code above will be something like:
414
+
415
+ not ok 1 - my-custom-pi# TODO not yet precise enough
416
+
417
+ # Failed test 'my-custom-pi'
418
+ # at test-todo.t line 7
419
+ # expected: '3.14159265358979'
420
+ # got: '3'
421
+
413
422
= item X < skip($reason, $count = 1)|skip >
414
423
415
424
Skip C < $count > tests, giving a C < $reason > as to why. By default only one
@@ -426,6 +435,9 @@ else {
426
435
}
427
436
= end code
428
437
438
+ Note that if you mark a test as skipped, you must also prevent that
439
+ test from running.
440
+
429
441
= item X < skip-rest($reason?)|skip-rest >
430
442
431
443
Skip the remaining tests. If the remainder of the tests in the test file
@@ -446,7 +458,10 @@ ok womble();
446
458
Note that C < skip-rest > requires a C < plan > to be set, otherwise the
447
459
C < skip-rest > call will throw an error. If no plan was set, you can use
448
460
C < done > to indicate the end of the test run (though of course the test
449
- summary will not count skipped tests).
461
+ summary will not count skipped tests). Note also the C < exit > is
462
+ required in the example to prevent the skipped tests from running.
463
+ Alternatively, you could enclose the remaining tests in an C < else >
464
+ branch.
450
465
451
466
= head1 Manual control
452
467
0 commit comments