summaryrefslogtreecommitdiffstats
path: root/t/fun/slurpy.t
diff options
context:
space:
mode:
Diffstat (limited to 't/fun/slurpy.t')
-rw-r--r--t/fun/slurpy.t20
1 files changed, 20 insertions, 0 deletions
diff --git a/t/fun/slurpy.t b/t/fun/slurpy.t
new file mode 100644
index 0000000..42a7f10
--- /dev/null
+++ b/t/fun/slurpy.t
@@ -0,0 +1,20 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use lib 't/fun/lib';
+
+use Fun;
+
+fun test_array ( $foo, @bar ) {
+ return [ $foo, @bar ];
+}
+
+fun test_hash ( $foo, %bar ) {
+ return { foo => $foo, %bar };
+}
+
+is_deeply( test_array( 1, 2 .. 10 ), [ 1, 2 .. 10 ], '... slurpy array worked' );
+is_deeply( test_hash( 1, ( two => 2, three => 3 ) ), { foo => 1, two => 2, three => 3 }, '... slurpy hash worked' );
+
+done_testing;