Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t] merged blocks/splatty_with_type.t into spec/

git-svn-id: http://svn.pugscode.org/pugs@22148 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 098b49abb36ae819860882f9c20004c0ed7c4d5e 1 parent 530e7f1
moritz authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 S06-signature/slurpy-params.t
View
8 S06-signature/slurpy-params.t
@@ -1,7 +1,7 @@
use v6;
use Test;
-plan 6;
+plan 8;
sub xelems(*@args) { @args.elems }
sub xjoin(*@args) { @args.join('|') }
@@ -17,4 +17,10 @@ sub mixed($pos1, *@slurp) { "|$pos1|" ~ @slurp.join('!') }
is mixed(1), '|1|', 'Positional and slurp params';
is mixed(1, 2, 3), '|1|2!3', 'Positional and slurp params';
+{
+ sub x_typed_join(Int *@args){ @args.join('|') }
+ is x_typed_join(1), '1', 'Basic slurpy params with types 1';
+ is x_typed_join(1, 2, 5), '1|2|5', 'Basic slurpy params with types 2';
+}
+
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.