From d014c200afc692c5aebacd8afa78150e3246afa7 Mon Sep 17 00:00:00 2001 From: Stevan Little Date: Wed, 12 Sep 2012 22:54:08 -0400 Subject: slurpy tests --- t/slurpy.t | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 t/slurpy.t (limited to 't/slurpy.t') diff --git a/t/slurpy.t b/t/slurpy.t new file mode 100644 index 0000000..da872ff --- /dev/null +++ b/t/slurpy.t @@ -0,0 +1,19 @@ +#!/usr/bin/env perl +use strict; +use warnings; +use Test::More; + +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; -- cgit v1.2.3-54-g00ecf