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