Skip to content

Commit ebaa8d8

Browse files
committed
Reduce variety of :skip-test explanations
This commit reduces the number of distinct reasons for :skip-test from 48 to 31. Most of them are generic "needs filesystem access", "needs ecosystem module", "illustrates error/trap" problems.
1 parent b6ddc51 commit ebaa8d8

17 files changed

+34
-34
lines changed

doc/Language/5to6-nutshell.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ an embedded instance of the C<perl> interpreter to run Perl 5 code.
4242
4343
This is as simple as:
4444
45-
=for code :skip-test<Inline module not always present when testing>
45+
=for code :skip-test<needs ecosystem>
4646
# the :from<Perl5> makes Perl 6 load Inline::Perl5 first (if installed)
4747
# and then load the Scalar::Util module from Perl 5
4848
use Scalar::Util:from<Perl5> <looks_like_number>;

doc/Language/5to6-perlvar.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ No longer exists in Perl 6. Because each Repository is responsible for
173173
remembering which modules have been loaded already. You can get a list
174174
of all loaded modules (compilation units) like so:
175175
176-
=for code :skip-test<missing module>
176+
=for code :skip-test<needs dummy module>
177177
use Test;
178178
use MyModule;
179179
say flat $*REPO.repo-chain.map(*.loaded); #-> (MyModule Test)

doc/Language/control.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ Class bodies behave like simple blocks for any top level expression; same goes
8989
to roles and other packages, like grammars (which are actually classes)
9090
or modules.
9191
92-
=begin code :skip-test<Fails>
92+
=begin code :skip-test<dies deliberately>
9393
class C {
9494
say "I live";
9595
die "I will never live!"

doc/Language/experimental.pod6

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Macro processing happens during parsing time. A macro generates an abstract
6161
syntax tree, which is grafted into the program syntax tree. C<quasi> is the
6262
routine that performs this task.
6363
64-
=begin code :skip-test<need use experimental>
64+
=begin code :skip-test<needs experimental>
6565
macro does-nothing() {
6666
quasi {}
6767
};
@@ -72,7 +72,7 @@ X<|quasi (macros)>
7272
Macros are a kind of routine, so they can take arguments in exactly the same
7373
way, and act also in almost the same way.
7474
75-
=begin code :skip-test<need use experimental>
75+
=begin code :skip-test<needs experimental>
7676
macro is-mighty( $who ) {
7777
quasi { "$who is mighty!"}
7878
};
@@ -86,7 +86,7 @@ including the quotes. Please note that we can also eliminate the parentheses for
8686
a macro call, following the same rules as a routine. You can use the unquoting
8787
construct C<{{{}}}> to get rid of this kind of thing:
8888
89-
=begin code :skip-test<need use experimental>
89+
=begin code :skip-test<needs experimental>
9090
macro is-mighty( $who ) {
9191
quasi { {{{$who}}} ~ " is mighty!"}
9292
};
@@ -96,7 +96,7 @@ say is-mighty "Freija"; # OUTPUT: «Freija is mighty!␤»
9696
Since macro expansion happens at parse time, care must be taken when using
9797
external variables in them:
9898
99-
=begin code :skip-test<need use experimental>
99+
=begin code :skip-test<needs experimental>
100100
use experimental :macros;
101101
my $called;
102102
macro called() {
@@ -136,7 +136,7 @@ It can be used when heavy calculations are involved, as in this sample that uses
136136
L<amicable numbers|https://perl6advent.wordpress.com/2018/12/25/calling-numbers-names/#more-7528>,
137137
taken from the 2018 Advent Calendar:
138138
139-
=begin code :skip-test<Uses experimental>
139+
=begin code :skip-test<needs experimental>
140140
use experimental :cached;
141141
142142
sub aliquot-parts( $number ) is cached {

doc/Language/functions.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ arguments. Consider this basic example:
362362
congratulate('being a cool number', 'Fred'); # OK
363363
congratulate('being a cool number', 'Fred', 42); # OK
364364
365-
=for code :skip-test<Proto match error>
365+
=for code :skip-test<illustrates error>
366366
congratulate('being a cool number', 42); # Proto match error
367367
368368
The proto insists that all C<multi congratulate> subs conform to the basic
@@ -395,7 +395,7 @@ with. Parameter defaults and type coercions will work but are not passed on.
395395
proto mistake-proto(Str() $str, Int $number = 42) {*}
396396
multi mistake-proto($str, $number) { say $str.^name }
397397
mistake-proto(7, 42); # OUTPUT: «Int␤» -- not passed on
398-
=for code :skip-test<compilation error>
398+
=for code :skip-test<illustrates error>
399399
mistake-proto('test'); # fails -- not passed on
400400
401401
=head2 X<only|declarator>

doc/Language/glossary.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ that name:
131131
# anonymous, but knows its own name
132132
my $s = anon sub triple($x) { 3 * $x }
133133
say $s.name; # OUTPUT: «triple␤»
134-
=for code :skip-test<error>
134+
=for code :skip-test<illustrates error>
135135
say triple(42); # OUTPUT: «Undeclared routine: triple␤»
136136
137137
X<|API>

doc/Language/grammar_tutorial.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ Will output exactly the same as the code above. Symptomatic of the difference
322322
between Classes and Roles, a conflict like defining C<token quote> twice
323323
using Role composition will result in an error:
324324
325-
=begin code :skip-test<compilation error>
325+
=begin code :skip-test<compile-time error>
326326
grammar Quoted-Quotes does Letters does Quote-Quotes does Quote-Other { ... }
327327
# OUTPUT: ... Error while compiling ... Method 'quote' must be resolved ...
328328
=end code

doc/Language/js-nutshell.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ In Perl 6, variables can be typed by placing the type between the declarator
710710
match the variable's type will throw either a compile-time or runtime error,
711711
depending on how the value is evaluated:
712712
713-
=begin code :skip-test<deliberate compile-time error>
713+
=begin code :skip-test<compile-time error>
714714
enum Name <Phoebe Daniel Joe>;
715715
my Str $name = 'Phoebe';
716716
$name = Phoebe; # Throws a compile-time error

doc/Language/list.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,7 @@ However, the following calls will all fail, due to passing an untyped array,
570570
even if the array just happens to contain Int values at the point it is
571571
passed:
572572
573-
=begin code :skip-test<compilation errors>
573+
=begin code :skip-test<illustrates error>
574574
my @c = 1, 3, 5;
575575
say mean(@c); # Fails, passing untyped Array
576576
say mean([1, 3, 5]); # Same

doc/Language/math.pod6

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ parameter.
279279
How can we translate that into Perl 6? Well Math::Model brings some help
280280
with a very understandable way to do that--let's see it:
281281
282-
=begin code :skip-test<can't use>
282+
=begin code :skip-test<needs ecosystem>
283283
use Math::Model;
284284
285285
my $m = Math::Model.new(
@@ -394,7 +394,7 @@ where the constant g defines the growth rate and k is the carrying
394394
capacity.
395395
Modifying the above code we can simulate its behavior in time:
396396
397-
=begin code :skip-test<can't use>
397+
=begin code :skip-test<needs ecosystem>
398398
use Math::Model;
399399
400400
my $m = Math::Model.new(
@@ -444,7 +444,7 @@ I<critical point>.
444444
445445
Our code would be:
446446
447-
=begin code :skip-test<can't use>
447+
=begin code :skip-test<needs ecosystem>
448448
use Math::Model;
449449
450450
my $m = Math::Model.new(
@@ -484,7 +484,7 @@ I<dx/dt=r*x*(1-x/k)*(x/a)**n>, with n>0
484484
485485
Our code would be:
486486
487-
=begin code :skip-test<can't use>
487+
=begin code :skip-test<needs ecosystem>
488488
use Math::Model;
489489
490490
my $m = Math::Model.new(

0 commit comments

Comments
 (0)