]> git.vpit.fr Git - perl/modules/Sub-Prototype-Util.git/blobdiff - t/10-flatten.t
_ shouldn't push elements in flatten, but skip them
[perl/modules/Sub-Prototype-Util.git] / t / 10-flatten.t
index 8c23c3c105e390eaa0bf45b91a47ba43186735a0..414cfcf26305652eee0a07960b31dde6a6fd618d 100644 (file)
@@ -41,10 +41,8 @@ my @tests = (
  [ '\[$@%]',   '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;