@@ -127,11 +127,13 @@ A typical test file looks something like this:
127
127
128
128
# .... tests
129
129
130
+ done-testing; # optional with 'plan'
131
+
130
132
We ensure that we're using Perl 6, via the C < use v6 > pragma, then we load
131
133
the C < Test > module and specify where our libraries are. We then specify how
132
134
many tests we I < plan > to run (such that the testing framework can tell us if
133
135
more or fewer tests were run than we expected) and when finished with the
134
- tests, we tell the framework that we are I < done > testing .
136
+ tests, we use I < done-testing > to tell the framework we are done.
135
137
136
138
= head1 Running tests
137
139
@@ -544,8 +546,8 @@ The result of a group of subtests is only C<ok> if all subtests are C<ok>.
544
546
= item X < subtest(&subtests, $description?)|subtest >
545
547
546
548
The C < subtest > function executes the given block, consisting of usually more
547
- than one test, possibly including a C < plan > or C < done > , and counts as I < one >
548
- test in C < plan > , C < todo > , or C < skip > counts. It will pass the
549
+ than one test, possibly including a C < plan > or C < done-testing > , and counts as
550
+ I < one > test in C < plan > , C < todo > , or C < skip > counts. It will pass the
549
551
test only if B < all > tests in the block, pass. The function accepts an
550
552
optional C < $description > of the test.
551
553
@@ -649,7 +651,7 @@ ok womble();
649
651
650
652
Note that C < skip-rest > requires a C < plan > to be set, otherwise the
651
653
C < skip-rest > call will throw an error. If no plan was set, you can use
652
- C < done > to indicate the end of the test run (though of course the test
654
+ C < done-testing > to indicate the end of the test run (though of course the test
653
655
summary will not count skipped tests). Note also the C < exit > is
654
656
required in the example to prevent the skipped tests from running.
655
657
Alternatively, you could enclose the remaining tests in an C < else >
0 commit comments