Skip to content

Commit c72b2e9

Browse files
committed
Remove duplicate done-testing text
1 parent 97836f7 commit c72b2e9

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

doc/Language/testing.pod6

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -211,37 +211,6 @@ Adding C<plan> gives a true picture of the test:
211211
Note that leaving the C<done-testing> in place will have no effect on the new test
212212
results, but it should be removed for clarity.
213213
214-
It is recommended that the C<done-testing> function be removed and replaced
215-
with a valid C<plan> function when all tests are finalized. Use of C<plan> can help
216-
detect test failures otherwise not reported because tests were accidentally skipped
217-
due to bugs in the tests or bugs in the compiler. For example:
218-
219-
sub do-stuff {@};
220-
use Test;
221-
ok .is-prime for do-stuff;
222-
done-testing;
223-
224-
# output:
225-
1..0
226-
227-
The above example is where a naive C<done-testing> fails. C<do-stuff()> returned
228-
nothing and tested nothing, even though it should've returned results to test. But
229-
the test suite doesn't know how many tests were meant to be run, so it passes.
230-
231-
Adding C<plan> gives a true picture of the test:
232-
233-
sub do-stuff {@};
234-
use Test;
235-
plan 1;
236-
ok .is-prime for do-stuff;
237-
238-
# output:
239-
1..1
240-
# Looks like you planned 1 test, but ran 0
241-
242-
Note that leaving the C<done-testing> in place will have no effect on the new test
243-
results, but it should be removed for clarity.
244-
245214
=head1 Testing return values
246215
247216
The C<Test> module exports various functions that check the return value of a

0 commit comments

Comments
 (0)