This is an automatically generated mail to inform you that tests are now available in t/spec/S02-builtin_data_types/anon_block.t
commit a09001edb5fe490880d97fc8e3e58fa7d18bbdb5 Author: kyle <k...@c213334d-75ef-0310-aa23-eaa082d1ae64> Date: Mon Aug 3 02:45:05 2009 +0000 [t/spec] Tests for RT #64844 git-svn-id: http://svn.pugscode.org/p...@27861 c213334d-75ef-0310-aa23-eaa082d1ae64 diff --git a/t/spec/S02-builtin_data_types/anon_block.t b/t/spec/S02-builtin_data_types/anon_block.t index 3cc0d60..41056ab 100644 --- a/t/spec/S02-builtin_data_types/anon_block.t +++ b/t/spec/S02-builtin_data_types/anon_block.t @@ -11,7 +11,7 @@ This covers anonymous blocks and subs, as well as pointy blocks =end description -plan 31; +plan 34; # L<S04/"The Relationship of Blocks and Declarations"> # L<S06/"Anonymous subroutines"> @@ -30,6 +30,25 @@ my $anon_block = { 1 }; isa_ok($anon_block, Block); is($anon_block(), 1, '{} <anon block> works'); +# RT #64844 +{ + eval '$anon_block( 1 )'; + #?rakudo todo 'Parrot support for zero-arg subs?' + ok $! ~~ Exception, 'too many parameters'; + + if $! !~~ Exception { + skip 2, q{tests don't work if previous test fails}; + } + else { + my $errmsg = ~$!; + + eval '$anon_block( foo => "RT #64844" )'; + ok $! ~~ Exception, 'too many parameters'; + #?rakudo todo 'RT #64844' + is ~$!, $errmsg, 'same error for named param as positional'; + } +} + # L<S06/""Pointy blocks""> { # pointy subs