[ '\[$@%]', 'class got scalarref', [ \1 ], [ 1 ] ],
[ '\[$@%]', 'class got arrayref', [ [ 1 ] ], [ 1 ] ],
[ '\[$@%]', 'class got hashref', [ { 1,2 } ], [ 1, 2 ] ],
- [ '_', '_ with argument', [ 1, 2 ], [ 1 ] ]
+ [ '_', '_ with argument', [ 1, 2 ], [ ] ],
+ [ '_', '_ with no argument', [ ], [ ] ]
);
-my $l = [ '_', '_ with no argument', [ ] ];
-$l->[3] = [ $l ];
-push @tests, $l;
is_deeply( [ flatten($_->[0], @{$_->[2]}) ], $_->[3], $_->[1]) for @tests;