Skip to content

Commit d2daaa6

Browse files
committed
run unit tests
1 parent d67bcde commit d2daaa6

File tree

4 files changed

+6
-10
lines changed

4 files changed

+6
-10
lines changed

doc/Language/5to6-nutshell.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,7 +1529,7 @@ C<is export> role on the relevant subs and I<all> subs with this role are
15291529
then exported. Hence, the following module C<Bar> exports the subs C<foo>
15301530
and C<bar> but not C<baz>:
15311531
1532-
=begin code :skip-test<unit>
1532+
=begin code :solo
15331533
unit module Bar;
15341534
15351535
sub foo($a) is export { say "foo $a" }
@@ -1630,7 +1630,7 @@ When you specify C<is export> in a sub declaration, you are in fact adding
16301630
this subroutine to the C<:DEFAULT> export group. But you can add a subroutine
16311631
to another group, or to multiple groups:
16321632
1633-
=for code :skip-test
1633+
=for code :solo
16341634
unit module Bar;
16351635
sub foo() is export { } # added by default to :DEFAULT
16361636
sub bar() is export(:FNORBL) { } # added to the FNORBL export group

doc/Language/create-cli.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ X<|declarator,unit (MAIN)>
243243
If the entire program body resides within C<MAIN>, you can use the C<unit>
244244
declarator as follows (adapting an earlier example):
245245
246-
=begin code :skip-test<unit>
246+
=begin code :solo
247247
unit sub MAIN(
248248
Str $file where *.IO.f = 'file.dat',
249249
Int :$length = 24,

doc/Language/modules.pod6

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,15 +489,13 @@ Be careful I<not> to put C<sub EXPORT> after L«C<unit> declarator|/syntax/unit
489489
If you do so, it'll become just a sub inside your package, rather than the special
490490
export sub:
491491
492-
=begin code :skip-test<unit module can't work here>
492+
=for code :skip-test<bad example>
493493
unit module Bar;
494494
sub EXPORT { %(Foo => &say) } # WRONG!!! Sub is scoped wrong
495495
496-
# ---------
497-
496+
=for code :solo
498497
sub EXPORT { %(Foo => &say) } # RIGHT!!! Sub is outside the module
499498
unit module Bar;
500-
=end code
501499
502500
=head2 Finding modules
503501

doc/Language/rb-nutshell.pod6

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,10 +1064,8 @@ C<is export> role on the relevant subs and I<all> subs with this role are
10641064
then exported. Hence, the following module C<Bar> exports the subs C<foo>
10651065
and C<bar> but not C<baz>:
10661066
1067-
=for code :skip-test<can't unit here>
1067+
=for code :solo
10681068
unit module Bar; # remainder of the file is in module Bar { ... }
1069-
1070-
=for code
10711069
sub foo($a) is export { say "foo $a" }
10721070
sub bar($b) is export { say "bar $b" }
10731071
sub baz($z) { say "baz $z" }

0 commit comments

Comments
 (0)