Skip to content

Commit

Permalink
added test for foreach
Browse files Browse the repository at this point in the history
  • Loading branch information
brunoV committed Mar 6, 2010
1 parent 1fca1cc commit de990db
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions t/foreach.t
@@ -0,0 +1,12 @@
use Test::More qw(no_plan);
use strict;
use warnings;

use autobox::Core;

my @array = qw(1 2 3);

my @added;
@array->foreach( sub { push @added, $_[0] + 1 } );

is_deeply [ sort @added ], [ qw(2 3 4) ];

0 comments on commit de990db

Please sign in to comment.