summaryrefslogblamecommitdiffstats
path: root/t/slurpy.t
blob: da872ff760ca14d928d4e1bc516250135d195823 (plain) (tree)


















                                                                                                                    
#!/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;