Skip to content

Commit 224a0bc

Browse files
committed
Completes preamble to fix compilation errors
Fixes #2055
1 parent 34aabd3 commit 224a0bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/Language/testing.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ module provides a testing framework. Perl 6's official spectest suite uses C<Te
1414
1515
The testing functions emit output conforming to the L<Test Anything Protocol|http://testanything.org>. In general, they are used in sink context:
1616
17-
=for code :preamble<my $meta="Avoid compilation errors";>
17+
=for code :preamble<my ($meta,$relaxed-name); sub check-name($meta,:$relaxed-name){}>
1818
ok check-name($meta, :$relaxed-name), "name has a hyphen rather than '::'"
1919
2020
but all functions also return as a Boolean if the test has been successful or not, which can be used to print a message if the test fails:
2121
22-
=begin code :preamble<my $meta="Avoid compilation errors";>
22+
=begin code :preamble<my ($meta,$relaxed-name); sub check-name($meta,:$relaxed-name){}>
2323
ok check-name($meta, :$relaxed-name), "name has a hyphen rather than '::'" \
2424
or diag "\nTo use hyphen in name, pass :relaxed-name to meta-ok\n";
2525
=end code

0 commit comments

Comments
 (0)