Skip to content

Commit cb3c5b5

Browse files
authored
Merge pull request #848 from dmaestro/done_testing_clarification
Remove references to 'done' method (obsolete)
2 parents 7c190ed + 29f9b56 commit cb3c5b5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

doc/Language/testing.pod6

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,13 @@ A typical test file looks something like this:
127127
128128
# .... tests
129129
130+
done-testing; # optional with 'plan'
131+
130132
We ensure that we're using Perl 6, via the C<use v6> pragma, then we load
131133
the C<Test> module and specify where our libraries are. We then specify how
132134
many tests we I<plan> to run (such that the testing framework can tell us if
133135
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.
135137
136138
=head1 Running tests
137139
@@ -544,8 +546,8 @@ The result of a group of subtests is only C<ok> if all subtests are C<ok>.
544546
=item X<subtest(&subtests, $description?)|subtest>
545547
546548
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
549551
test only if B<all> tests in the block, pass. The function accepts an
550552
optional C<$description> of the test.
551553
@@ -649,7 +651,7 @@ ok womble();
649651
650652
Note that C<skip-rest> requires a C<plan> to be set, otherwise the
651653
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
653655
summary will not count skipped tests). Note also the C<exit> is
654656
required in the example to prevent the skipped tests from running.
655657
Alternatively, you could enclose the remaining tests in an C<else>

0 commit comments

Comments
 (0)