Skip to content

Commit abb6bb6

Browse files
committed
Don't skip if not needed.
Drop back to :solo testing when needed, remove the skip entirely when possible. We're not executing any of this code, only compiling it.
1 parent 8998650 commit abb6bb6

38 files changed

+71
-71
lines changed

doc/Language/contexts.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ string context will behave as a string, thus yielding an error.
125125
126126
However,
127127
128-
=begin code :skip-test<Stringification error>
128+
=begin code
129129
my $non-empty = Buf.new(0x3, 0x33);
130130
my $empty = [];
131131
my $non-empty-also = Buf.new(0x2,0x22);
@@ -158,4 +158,4 @@ contextualizer, with the result shown above.
158158
159159
=end pod
160160

161-
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
161+
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6

doc/Language/grammar_tutorial.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ values: create, retrieve, update or delete.
336336
There are several ways to accomplish this. For example, you could change the
337337
command method:
338338
339-
=begin code :skip-test
339+
=begin code :solo
340340
token command { \w+ }
341341
342342
# …becomes…
@@ -715,4 +715,4 @@ tokens.
715715
716716
=end pod
717717

718-
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
718+
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6

doc/Language/hashmap.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ However, what you are defining here is a key pointing to a L<Pair>, which is
166166
fine if that is what you want, and if your nested hash has got a single key. But
167167
C<%h<e>> will point to a C<Pair> which will have these consequences:
168168
169-
=begin code :skip-test<Illustrates an error>
169+
=begin code
170170
my %h = e => f => 'g';
171171
%h<e><q> = 'k';
172172
# OUTPUT: «(exit code 1) Pair␤Cannot modify an immutable Str (Nil)␤ in block <unit>»

doc/Language/io-guide.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ my $data = 'foo/bar'.IO.add($file).slurp;
251251
However, it's fine to use it for things not otherwise provided by L<IO::Path>.
252252
For example, the L<C«.devnull» method|/routine/devnull>:
253253
254-
=for code :skip-test
254+
=for code
255255
{
256256
temp $*OUT = open :w, $*SPEC.devnull;
257257
say "In space no one can hear you scream!";

doc/Language/list.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,7 @@ via the C<shape> method.
613613
614614
Shape will control the amount of elements that can be assigned by dimension:
615615
616-
=begin code :skip-test<Illustrates exception>
616+
=begin code
617617
my @just-two[2] = <alpha betta kappa>;
618618
# Will throw exception: «Index 2 for dimension 1 out of range (must be 0..1)»
619619
=end code
@@ -749,4 +749,4 @@ creature should never be passed back to unsuspecting users.
749749
750750
=end pod
751751

752-
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6
752+
# vim: expandtab softtabstop=4 shiftwidth=4 ft=perl6

doc/Language/math.pod6

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ We declare the derivatives that are in our model. In this case, if
325325
you remember our equation, we have our variable I<x> and its derivative
326326
I<x'> (usually know as the velocity).
327327
328-
=begin code :skip-test<Snippet for explanation purposes>
328+
=begin code
329329
derivatives => {
330330
velocity => 'x',
331331
},
@@ -338,7 +338,7 @@ formulas for the derivatives that are not also integration variables
338338
(in this case, only I<x>), and for other variables we use in the formulas
339339
(the growth rate).
340340
341-
=begin code :skip-test<Snippet for explanation purposes>
341+
=begin code
342342
variables => {
343343
velocity => { $:growth_constant * $:x},
344344
growth_constant => { 1 }, # basal growth rate
@@ -352,7 +352,7 @@ Finally we declare our initial conditions and use I<captures> to
352352
tell L<C<Math::Model>|https://github.com/moritz/Math-Model> which
353353
variable or variables to record while the simulation is running.
354354
355-
=begin code :skip-test<Snippet for explanation purposes>
355+
=begin code
356356
initials => {
357357
x => 3,
358358
},

doc/Language/module-packages.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ with the C<unit> keyword; C<unit module> specifies that the
122122
rest of the compilation unit is part of the declared module. Here's
123123
C<Foo.pm6> rewritten with C<unit>:
124124
125-
=begin code :skip-test<filesystem related>
125+
=begin code :solo
126126
unit module Foo;
127127
128128
sub greeting ($name = 'Camelia') { "Greetings, $name!" }

doc/Language/modules.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ Be careful I<not> to put C<sub EXPORT> after L«C<unit> declarator|/syntax/unit
491491
If you do so, it'll become just a sub inside your package, rather than the special
492492
export sub:
493493
494-
=for code :skip-test<bad example>
494+
=for code :solo
495495
unit module Bar;
496496
sub EXPORT { %(Foo => &say) } # WRONG!!! Sub is scoped wrong
497497

doc/Language/nativecall.pod6

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ are trying to create.
4141
NativeCall provides a C<symbol> trait for you to specify the name of the native
4242
routine in your library that may be different from your Perl subroutine name.
4343
44-
=begin code :skip-test
44+
=begin code :solo
4545
unit module Foo;
4646
use NativeCall;
4747
our sub init() is native('foo') is symbol('FOO_INIT') { * }
@@ -667,7 +667,7 @@ to be prepended with "lib" and appended with ".so" (or just appended with
667667
".dll" on Windows), and will be searched for in the paths in the
668668
LD_LIBRARY_PATH (PATH on Windows) environment variable.
669669
670-
=begin code :skip-test
670+
=begin code
671671
use NativeCall;
672672
constant LIBMYSQL = 'mysqlclient';
673673
constant LIBFOO = '/usr/lib/libfoo.so.1';
@@ -986,7 +986,7 @@ a buffer with the C<addrinfo>.
986986
987987
Putting all these together, leads to the following program:
988988
989-
=begin code :skip-test<Code works as is. Error with compilation maybe related to wrapping>
989+
=begin code :solo
990990
#!/usr/bin/env perl6
991991
992992
use v6;

doc/Language/nativetypes.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ my Pointer[void] $native = nativecast(Pointer[void], Blob.new(0x22, 0x33));
154154
However, outside that, the functionality it offers is quite limited, since
155155
pointers to void cannot be dereferenced:
156156
157-
=begin code :skip-test<unhandled type error>
157+
=begin code
158158
use NativeCall;
159159
my Pointer[void] $native = nativecast(Pointer[void], Buf.new(0x22, 0x33));
160160
say $native.deref; # ERROR OUTPUT: «Internal error: unhandled target type␤»

0 commit comments

Comments
 (0)