6 use Test::More tests => 5;
9 use_ok('Moose::Autobox');
15 [ 1 .. 5 ]->map(sub { $_ * $_ }),
17 '... got the expected return values');
20 [ 1 .. 5 ]->map(sub { $_ * $_ })->do(sub { $_->zip($_) }),
21 [ [1, 1], [4, 4], [9, 9], [16, 16], [25, 25] ],
22 '... got the expected return values');
24 is( # sprintf an array ...
25 [ 1 .. 5 ]->sprintf("%d -> %d -> %d"),
27 '... got the sprintf-ed values');
29 is( # sprintf an array ...
33 ->map(sub { '%d (' . $_ . ')' })
36 '1 (0) -> 2 (1) -> 3 (2) -> 4 (3) -> 5 (4)',
37 '... got a more elaboratly sprintf-ed values');