Skip to content

Commit 0b5126a

Browse files
committed
unfudge many unneeded :skip-tests
1 parent 3c7fe8a commit 0b5126a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+211
-213
lines changed

doc/Language/classtut.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ key principles of object oriented design.
145145
The first declaration specifies instance storage for a callback – a bit of
146146
code to invoke in order to perform the task that an object represents:
147147
148-
=for code :skip-test
148+
=for code
149149
has &!callback;
150150
151151
X<|sigils,&>
@@ -170,7 +170,7 @@ class (or some subclass of it).
170170
171171
The third attribute represents the state of completion of a task:
172172
173-
=for code :skip-test
173+
=for code
174174
has Bool $.done;
175175
176176
X<|twigils,.>

doc/Language/concurrency.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ more values need to be fetched and loaded into the channel:
515515
Channels can be used in place of the L<Supply> in the C<whenever> of a
516516
C<react> block described earlier:
517517
518-
=begin code :skip-test
518+
=begin code
519519
my $channel = Channel.new;
520520
my $p = start {
521521
react {

doc/Language/control.pod6

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ and how they are used is explained
4343
L<elsewhere|/language/functions#Blocks_and_Lambdas>. For now it is just
4444
important to understand when blocks run and when they do not:
4545
46-
=for code :skip-test
46+
=for code
4747
say "We get here"; { say "then here." }; { say "not here"; 0; } or die;
4848
4949
In the above example, after running the first statement, the first block stands
@@ -89,7 +89,7 @@ have unnecessary semicolons for clarity.
8989
The simplest way to run a block where it cannot be a stand-alone statement
9090
is by writing C<do> before it:
9191
92-
=for code :skip-test
92+
=for code
9393
# This dies half of the time
9494
do { say "Heads I win, tails I die."; Bool.pick } or die; say "I win.";
9595
@@ -178,7 +178,7 @@ A compound conditional may be produced by following an C<if> conditional
178178
with C<else> to provide an alternative block to run when the conditional
179179
expression is false:
180180
181-
=for code :skip-test
181+
=for code
182182
if 0 { say "no" } else { say "yes" } ; # says "yes"
183183
if 0 { say "no" } else{ say "yes" } ; # says "yes", space is not required
184184
@@ -316,7 +316,7 @@ The following examples should illustrate the C<if> or C<when> block's default be
316316
assuming no special exit or other side effect statements are included
317317
in the C<if> or C<when> blocks:
318318
319-
=begin code :skip-test
319+
=begin code
320320
{
321321
if X {...} # if X is true in boolean context, block is executed
322322
# following statements are executed regardless
@@ -336,7 +336,7 @@ context test defaults to C<$_ ~~> while the C<if>'s does not. That has an effec
336336
how one uses the X in the C<when> block without a value for C<$_> (it's C<Any> in
337337
that case and C<Any> smart matches on C<True>: C<Any ~~ True> yields C<True>). Consider the following:
338338
339-
=begin code :skip-test
339+
=begin code
340340
{
341341
my $a = 1;
342342
my $b = True;
@@ -350,7 +350,7 @@ that case and C<Any> smart matches on C<True>: C<Any ~~ True> yields C<True>).
350350
Finally, C<when>'s statement modifier form does not effect execution
351351
of following statements either inside or outside of another block:
352352
353-
=begin code :skip-test
353+
=begin code
354354
say "foo" when X; # if X is true statement is executed
355355
# following statements are not affected
356356
=end code
@@ -401,7 +401,7 @@ A C<for> may be used on lazy lists – it will only take elements from the
401401
list when they are needed, so to read a file line by line, you could
402402
use:
403403
404-
=for code :skip-test
404+
=for code
405405
for $*IN.lines -> $line { .say }
406406
407407
Iteration variables are always lexical, so you don't need to use C<my> to give
@@ -661,7 +661,7 @@ iteration.
661661
662662
The infinite loop does not require parentheses.
663663
664-
=for code :skip-test
664+
=for code
665665
loop { say 'forever' }
666666
667667
The C<loop> statement may be used to produce values from the result of each
@@ -894,7 +894,7 @@ prints "12".
894894
The C<redo> command restarts the loop block without evaluating the
895895
conditional again.
896896
897-
=for code :skip-test
897+
=for code
898898
loop {
899899
my $x = prompt("Enter a number");
900900
redo unless $x ~~ /\d+/;

doc/Language/faq.pod6

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ $x = Int
240240
If you want to exclude type objects, you can append the C<:D> type smiley,
241241
which stands for "definite":
242242
243-
=begin code :skip-test
243+
=begin code
244244
my Int:D $x = 42;
245245
$x = Int; # dies with:
246246
# Type check failed in assignment to $x;
@@ -258,7 +258,7 @@ a type or a definite value.
258258
259259
Example of a type constraint:
260260
261-
=begin code :skip-test
261+
=begin code
262262
sub divide-to-int( Int $a, Int $b --> Int ) {
263263
return ($a / $b).narrow;
264264
}
@@ -322,7 +322,7 @@ can also contain arrays directly:
322322
The big difference is that arrays inside a scalar act as one value in list
323323
context, whereas arrays will be happily iterated over.
324324
325-
=begin code :skip-test
325+
=begin code
326326
my @a = 1, 2, 3;
327327
my $s = @a;
328328
@@ -360,7 +360,7 @@ There are several reasons:
360360
361361
You likely tried to mix string interpolation and HTML.
362362
363-
=begin code :skip-test
363+
=begin code
364364
my $foo = "abc";
365365
say "$foo<html-tag>";
366366
=end code

doc/Language/functions.pod6

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ Coercion types can help you to have a specific type inside a routine, but
800800
accept wider input. When the routine is called, the argument is automatically
801801
converted to the narrower type.
802802
803-
=begin code :skip-test
803+
=begin code
804804
sub double(Int(Cool) $x) {
805805
2 * $x
806806
}
@@ -818,7 +818,7 @@ to C<Int()>.
818818
The coercion works by looking for a method with the same name
819819
as the target type. You can define coercions for your own types like so:
820820
821-
=begin code :skip-test
821+
=begin code
822822
class Bar {...}
823823
824824
class Foo {

doc/Language/glossary.pod6

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ For example, the L«C<IO::Handle.lines>|/type/IO::Handle#method_lines» returns
829829
a L<Seq>. The following code contains a bug; keeping reification in mind, try to
830830
spot it:
831831
832-
=for code :skip-test
832+
=for code
833833
my $fh = "/tmp/bar".IO.open;
834834
my $lines = $fh.lines;
835835
close $fh;
@@ -848,15 +848,15 @@ to read from a closed handle. So, to fix the bug we can either assign to
848848
a C<@>-sigiled variable or call L«C<.elems>|/routine/elems» on C<$lines> before
849849
closing the handle:
850850
851-
=for code :skip-test
851+
=for code
852852
my $fh = "/tmp/bar".IO.open;
853853
my @lines = $fh.lines;
854854
close $fh;
855855
say @lines[0]; # no problem!
856856
857857
Also good:
858858
859-
=for code :skip-test
859+
=for code
860860
my $fh = "/tmp/bar".IO.open;
861861
my $lines = $fh.lines;
862862
say "Read $lines.elems() lines"; #reifying before closing handle

doc/Language/haskell-to-p6.pod6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ The equivalent in Perl 6 is the following.
205205
206206
It should be noted that in Perl 6, one can also create a subset of an existing type.
207207
208-
=begin code :skip-test
208+
=begin code
209209
subset Name of Str where *.chars < 20;
210210
211211
sub full-name(Name $first, Name $last) {

doc/Language/io-guide.pod6

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ read the data in one chunk. Unless you're working with very large files that
7272
are difficult to store entirely in memory all at the same time, these two
7373
routines are for you.
7474
75-
=for code :skip-test
75+
=for code
7676
"my-file.txt".IO.spurt: "I ♥ Perl!";
7777
7878
The code above creates a file named C<my-file.txt> in the current directory
@@ -95,7 +95,7 @@ could note the L«C<spurt> documentation|/routine/spurt» mentions C<:append>
9595
argument. However, for finer control, let's get ourselves an L<IO::Handle>
9696
to work with:
9797
98-
=for code :skip-test
98+
=for code
9999
my $fh = 'my-file.txt'.IO.open: :a;
100100
$fh.print: "I count: ";
101101
$fh.print: "$_ " for ^10;
@@ -131,7 +131,7 @@ handles get a chance to get garbage collected.
131131
We've seen in previous sections that writing stuff to files is a single-line
132132
of code in Perl 6. Reading from them, is similarly easy:
133133
134-
=for code :skip-test
134+
=for code
135135
say 'my-file.txt'.IO.slurp; # OUTPUT: «I ♥ Perl!␤»
136136
say 'my-file.txt'.IO.slurp: :bin; # OUTPUT: «Buf[uint8]:0x<49 20 e2 99 a5 20 50 65 72 6c 21>␤»
137137
@@ -153,13 +153,13 @@ them out. Despite the file itself being too large to fit into available
153153
L<RAM|https://en.wikipedia.org/wiki/Random-access_memory>, the program will
154154
not have any issues running, as the contents are processed in small chunks:
155155
156-
=for code :skip-test
156+
=for code
157157
.say for '500-PetaByte-File.txt'.IO.lines.grep: *.contains: 'Perl';
158158
159159
Here's another example that prints the first 100 words from a file, without
160160
loading it entirely:
161161
162-
=for code :skip-test
162+
=for code
163163
.say for '500-PetaByte-File.txt'.IO.words: 100
164164
165165
Note that we did this by passing a limit argument to
@@ -181,7 +181,7 @@ is there to help you with that.
181181
Of course, you can read from files using the L<IO::Handle> type, which gives you
182182
a lot finer control over what you're doing:
183183
184-
=begin code :skip-test
184+
=begin code
185185
given 'some-file.txt'.IO.open {
186186
say .readchars: 8; # OUTPUT: «I ♥ Perl␤»
187187
.seek: 1, SeekFromCurrent;
@@ -257,7 +257,7 @@ L«C<IO::Path>|/type/IO::Path» was instantiated with. It doesn't consider the
257257
value of the L«C<$.CWD> attribute|/type/IO::Path#attribute_CWD». For example, this
258258
code is broken:
259259
260-
=for code :skip-test
260+
=for code
261261
# WRONG!! .Str DOES NOT USE $.CWD!
262262
my $path = 'foo'.IO;
263263
chdir 'bar';
@@ -272,7 +272,7 @@ L«C<.relative>|/routine/relative» to stringify the object. Both routines retur
272272
a L«C<Str>|/type/Str» object; they only differ in whether the result is an
273273
absolute or relative path. So, we can fix our code like this:
274274
275-
=for code :skip-test
275+
=for code
276276
# RIGHT!! .absolute does consider the value of $.CWD!
277277
my $path = 'foo'.IO;
278278
chdir 'bar';
@@ -292,7 +292,7 @@ things to pay attention to.
292292
293293
This code is a mistake:
294294
295-
=for code :skip-test
295+
=for code
296296
# WRONG!!
297297
my $*CWD = "foo".IO;
298298
@@ -308,7 +308,7 @@ to L«C<$*CWD>|/language/variables#Dynamic_variables», just like C<my> would,
308308
but it won't make it undefined, so the L«C<.IO>|/routine/IO» coercer will still
309309
get the correct old value:
310310
311-
=for code :skip-test
311+
=for code
312312
temp $*CWD = "foo".IO;
313313
314314
Better yet, if you want to perform some code in a localized

0 commit comments

Comments
 (0)