foo
[gitmo/Moose-Autobox.git] / t / 004_list_compressions.t
diff --git a/t/004_list_compressions.t b/t/004_list_compressions.t
new file mode 100644 (file)
index 0000000..d97775f
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Test::More tests => 3;
+
+BEGIN {
+    use_ok('Moose::Autobox');
+}
+
+use autobox;
+
+is_deeply(
+[ 1 .. 5 ]->map(sub { $_ * $_ }),
+[ 1, 4, 9, 16, 25 ],
+'... got the expected return values');
+
+is_deeply(
+[ 1 .. 5 ]->map(sub { $_ * $_ })->do(sub { $_->zip($_) }),
+[ [1, 1], [4, 4], [9, 9], [16, 16], [25, 25] ],
+'... got the expected return values');
\ No newline at end of file