Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 25 lines (16 sloc) 0.459 kB
b254a8b [gsoc_spectest] Test reorganization.
Auzon authored
1 use v6;
2
3 use Test;
4
02c58e2 [spec]
moritz authored
5 =begin description
b254a8b [gsoc_spectest] Test reorganization.
Auzon authored
6
1a72abf [t/spec] typo
wollmers authored
7 This tests the &?BLOCK magical from Synopsis 6
b254a8b [gsoc_spectest] Test reorganization.
Auzon authored
8
02c58e2 [spec]
moritz authored
9 =end description
b254a8b [gsoc_spectest] Test reorganization.
Auzon authored
10
eda6db1 [t/spec] move smartlinks from POD to ordinary comments
moritz authored
11 # L<S06/The C<&?BLOCK> object>
b254a8b [gsoc_spectest] Test reorganization.
Auzon authored
12
eda6db1 [t/spec] move smartlinks from POD to ordinary comments
moritz authored
13 plan 1;
d75e43e [t/spec] Fudged block.t for rakudo
azawawi authored
14
fd322e4 @FROGGS skip &?BLOCK test on rakudo, RT 125131
FROGGS authored
15 #?rakudo skip '&?BLOCK NYI RT #125131'
16 {
b254a8b [gsoc_spectest] Test reorganization.
Auzon authored
17 # L<S02/Names/Which block am I in?>
18 # L<S06/The C<&?BLOCK> object/tail-recursion on an anonymous block:>
19 my $anonfactorial = -> Int $n { $n < 2 ?? 1 !! $n * &?BLOCK($n-1) };
20
21 my $result = $anonfactorial(3);
fd322e4 @FROGGS skip &?BLOCK test on rakudo, RT 125131
FROGGS authored
22 is($result, 6, 'the &?BLOCK magical worked');
23 }
eda6db1 [t/spec] move smartlinks from POD to ordinary comments
moritz authored
24 # vim: ft=perl6
Something went wrong with that request. Please try again.