X-Git-Url: http://git.vpit.fr/?a=blobdiff_plain;f=t%2F22-call.t;h=6aa786333a1bebd54980c6a27c63267796510e74;hb=3271ef4bff5871bc6aa2d90537f97f177cbacc2a;hp=fdd3812fcdfac933dafba9e12f01de1c75e2d5e3;hpb=1f19bf4c8d416851e583ef834e7ab605c2e2af32;p=perl%2Fmodules%2FSub-Nary.git diff --git a/t/22-call.t b/t/22-call.t index fdd3812..6aa7863 100644 --- a/t/22-call.t +++ b/t/22-call.t @@ -3,7 +3,7 @@ use strict; use warnings; -use Test::More tests => 41; +use Test::More tests => 42; use Sub::Nary; @@ -24,6 +24,8 @@ sub rec1 { rec2(); } sub rec2 { rec1(); } my @tests = ( + [ sub { hlaghlaghlagh() }, 'list' ], + [ sub { zero }, 0 ], [ sub { one }, 1 ], [ sub { two }, 2 ], @@ -80,6 +82,7 @@ my @tests = ( my $i = 1; for (@tests) { my $r = $sn->nary($_->[0]); - is_deeply($r, { $_->[1] => 1 }, 'call test ' . $i); + my $exp = ref $_->[1] ? $_->[1] : { $_->[1] => 1 }; + is_deeply($r, $exp, 'call test ' . $i); ++$i; }