Permalink
Browse files

do some multidim slurpy tests (fudged for rakudo)

  • Loading branch information...
1 parent f3b450b commit 956f9fc679a844fe0e9acd3e44ee865ff3a0cc43 @timo timo committed Jun 19, 2013
Showing with 24 additions and 1 deletion.
  1. +24 −1 S06-signature/multidimensional.t
@@ -2,7 +2,7 @@ use v6;
use Test;
-plan 5;
+plan 10;
# L<S06/"Multidimensional argument list binding">
@@ -26,4 +26,27 @@ sub get_multidim_arglist (**@AoA) { @AoA }
is ~@AoA[0], "a b c", "multidim arglist binding with only one array (2)";
}
+multi sub multi_get_multidim_arglist(**@AoA) { @AoA }
+multi sub multi_get_multidim_arglist(Int $a) { $a }
+
+#?rakudo skip 'multi sub multidim arglist broken'
+{
+ my @a1 = <a b c>;
+ my @a2 = <d e f>;
+
+ my @AoA = multi_get_multidim_arglist(@a1; @a2);
+ is +@AoA, 2, "multi sub with multidim arglist binding (1)";
+ is @AoA[0], "a b c", "multi sub with multidim arglist binding (2)";
+ is @AoA[1], "d e f", "multi sub with multidim arglist binding (3)";
+}
+
+#?rakudo skip 'multi sub multidim arglist broken'
+{
+ my @a1 = <a b c>;
+
+ my @AoA = multi_get_multidim_arglist(@a1);
+ is +@AoA, 1, "multi sub with multidim arglist binding for only one array (1)";
+ is @AoA[0], "a b c", "multi sub with multidim arglist binding for only one array (2)";
+}
+
# vim: ft=perl6

0 comments on commit 956f9fc

Please sign in to comment.