Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[t/spec] RT #75900

git-svn-id: http://svn.pugscode.org/pugs@31903 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 9f54ff7ae562068e7f6959c3d608478f27bb92a3 1 parent 38b5f63
moritz authored
Showing with 16 additions and 1 deletion.
  1. +16 −1 S06-signature/unpack-array.t
View
17 S06-signature/unpack-array.t
@@ -1,6 +1,6 @@
use v6;
use Test;
-plan 11;
+plan 13;
# L<S06/Unpacking array parameters>
@@ -36,4 +36,19 @@ sub blat ($x, @a [$a, *@b]) {
is blat( 1, [2,3,4] ), "2|3|4", 'unpack named array';
is blat( 2, [2,3,4] ), "2-3-4", 'unpack named array with named pieces';
+# RT #75900
+{
+ my @my-array = 4,2,3,4;
+
+ sub fsort-only([$p?,*@r]) {
+ return fsort-only(@r.grep( {$_ <= $p} )),$p,fsort-only(@r.grep( {$_ > $p} )) if $p || @r;
+ }
+ sub fsort-multi([$p?,*@r]) {
+ return fsort-multi(@r.grep( {$_ <= $p} )),$p,fsort-multi(@r.grep( {$_ > $p} )) if $p || @r;
+ }
+
+ is fsort-only(@my-array).join(' '), '2 3 4 4', 'array unpacking and only-subs';
+ is fsort-multi(@my-array).join(' '), '2 3 4 4', 'array unpacking and only-multi';
+}
+
# vim: ft=perl6
Please sign in to comment.
Something went wrong with that request. Please try again.