Permalink
Browse files

Test reduce metaop of hyper metaop with ...

0 and 1 element arrays.

RT #122475
  • Loading branch information...
MasterDuke17 committed May 10, 2017
1 parent 42a4bc6 commit 1244df8c4aa5ed9b6ac9d852eac5a5b7c98e1bd0
Showing with 10 additions and 1 deletion.
  1. +10 −1 S03-metaops/reduce.t
View
@@ -1,6 +1,6 @@
use v6;
use Test;
plan 556;
plan 558;
=begin pod
@@ -164,6 +164,15 @@ lives-ok({my @foo = [1..3] >>+<< [1..3] >>+<< [1..3]},'Sanity Check');
lives-ok({my @foo = [>>+<<] ([1..3],[1..3],[1..3])},'Parse [>>+<<]');
# RT #122475
{
my @a = $(1, 2, 3);
my @b = [>>+<<] @a;
is-deeply @b, @a, 'reduce metaop of hyper metaop works with only one element';
#?rakudo.moar todo 'reduce metaop of hyper metaop works with zero elements'
eval-lives-ok q|my @a; [>>+<<] @a|, 'reduce metaop of hyper metaop works with zero elements';
}
# Check that user defined infix ops work with [...], too.
{
sub infix:<more_than_plus>($a, $b) { $a + $b + 1 }

0 comments on commit 1244df8

Please sign in to comment.