Permalink
Browse files

[t/spec]: Unfudge a passing todo, add some implicit slurpy param tests.

git-svn-id: http://svn.pugscode.org/pugs@26664 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
pmichaud
pmichaud committed May 4, 2009
1 parent 7e9b17b commit 4701aa5e58b9c82e9957929573279898cca0826e
Showing with 11 additions and 2 deletions.
  1. +11 −1 S06-signature/slurpy-params.t
  2. +0 −1 S06-signature/slurpy-placeholders.t
@@ -3,7 +3,7 @@ use Test;
# L<S06/List parameters/Slurpy parameters>
-plan 14;
+plan 18;
sub xelems(*@args) { @args.elems }
sub xjoin(*@args) { @args.join('|') }
@@ -46,4 +46,14 @@ is first_arg_copy(1, 2, 3), '1', 'can grab first item of a slurpy array (is cop
}
+sub whatever {
+ is(@_[3], 'd', 'implicit slurpy param flattens');
+ is(@_[2], 'c', 'implicit slurpy param flattens');
+ is(@_[1], 'b', 'implicit slurpy param flattens');
+ is(@_[0], 'a', 'implicit slurpy param flattens');
+}
+
+whatever( 'a' p5=> 'b', 'c' p5=> 'd' );
+
+
# vim: ft=perl6
@@ -33,7 +33,6 @@ sub perl5sub {
push @result, @_[1];
}
perl5sub(<foo bar>);
-#?rakudo todo '@_ details'
is(@result, [<foo bar>], 'use @_ in sub');

0 comments on commit 4701aa5

Please sign in to comment.