Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 28 lines (17 sloc) 0.464 kb
9b46033 [t] move slurpy_code_param.t to spec/; add smartlink
moritz authored
1 use v6;
2
3
4 use Test;
5
6 plan 6;
7
8 # L<S06/Slurpy block/>
9
10 sub foo (Code *$block) {
11 return $block.();
12 }
13
14 is(foo():{ "foo" }, 'foo', 'Code *$block - 1');
15 is(foo():{ 0 }, 0, 'Code *$block - 2');
16
17 sub bar (*&block) {
18 return &block.();
19 }
20
21 is(bar():{ "bar" }, 'bar', '*&block - 1');
22 is(bar():{ 0 }, 0, '*&block - 2');
23
24 is(foo():{ "foo" }, bar():{ "foo" }, 'Code *$block == *&block - 1');
25 is(foo():{ 0 }, bar():{ 0 }, 'Code *$block == *&block - 2');
7f29bc5 [t/spec] Add vim: lines everywhere.
kyle authored
26
27 # vim: ft=perl6
Something went wrong with that request. Please try again.