import all tests from Fun
[p5sagit/Function-Parameters.git] / t / foreign / Fun / slurpy.t
CommitLineData
98478aff 1#!perl
2use strict;
3use warnings FATAL => 'all';
4use Test::More;
5
6use Function::Parameters;
7
8fun test_array ( $foo, @bar ) {
9 return [ $foo, @bar ];
10}
11
12fun test_hash ( $foo, %bar ) {
13 return { foo => $foo, %bar };
14}
15
16is_deeply( test_array( 1, 2 .. 10 ), [ 1, 2 .. 10 ], '... slurpy array worked' );
17is_deeply( test_hash( 1, ( two => 2, three => 3 ) ), { foo => 1, two => 2, three => 3 }, '... slurpy hash worked' );
18
19done_testing;