Skip to content

Commit

Permalink
Add a test for HASH->each as it exists now.
Browse files Browse the repository at this point in the history
For #142
  • Loading branch information
schwern committed Sep 27, 2011
1 parent bfb1133 commit 046419f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions t/each.t
@@ -0,0 +1,15 @@
#!/usr/bin/perl

use perl5i::latest;
use Test::More;

note "each with no signature"; {
my %want = (foo => 23, bar => 42);

my %have;
%want->each( sub { $have{$_[0]} = $_[1] } );

is_deeply \%have, \%want;
}

done_testing;

0 comments on commit 046419f

Please sign in to comment.