Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t] move slurpy_code_param.t to spec/; add smartlink

git-svn-id: http://svn.pugscode.org/pugs@26210 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 9b460339b271c7acef068e9167561aca0f9e39fa 1 parent b8fa545
moritz authored
Showing with 25 additions and 0 deletions.
  1. +25 −0 S06-signature/slurpy-blocks.t
View
25 S06-signature/slurpy-blocks.t
@@ -0,0 +1,25 @@
+use v6;
+
+
+use Test;
+
+plan 6;
+
+# L<S06/Slurpy block/>
+
+sub foo (Code *$block) {
+ return $block.();
+}
+
+is(foo():{ "foo" }, 'foo', 'Code *$block - 1');
+is(foo():{ 0 }, 0, 'Code *$block - 2');
+
+sub bar (*&block) {
+ return &block.();
+}
+
+is(bar():{ "bar" }, 'bar', '*&block - 1');
+is(bar():{ 0 }, 0, '*&block - 2');
+
+is(foo():{ "foo" }, bar():{ "foo" }, 'Code *$block == *&block - 1');
+is(foo():{ 0 }, bar():{ 0 }, 'Code *$block == *&block - 2');
Please sign in to comment.
Something went wrong with that request. Please try again.