Skip to content

Commit

Permalink
.tap block with incorrect signature must fail
Browse files Browse the repository at this point in the history
RT#126379
  • Loading branch information
zoffixznet committed Jul 5, 2016
1 parent 935dae2 commit 046e0bf
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion S17-supply/basic.t
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
use v6;
use lib <t/spec/packages>;

use Test;
use Test::Util;

plan 88;
plan 90;

for ThreadPoolScheduler.new, CurrentThreadScheduler -> $*SCHEDULER {
diag "**** scheduling with {$*SCHEDULER.WHAT.perl}";
Expand Down Expand Up @@ -139,6 +141,17 @@ for ThreadPoolScheduler.new, CurrentThreadScheduler -> $*SCHEDULER {

$t1.close;
}

# RT #126379
{
is_run q[Supply.interval(1).tap(-> { say 'hi' }); sleep 3;], {
status => 256,
err => /
'Unhandled exception in code scheduled on thread' .+
'Too many positionals' .+ 'expected 0 arguments but got 1'
/
}, '.tap block with incorrect signature must fail';
}
}

# vim: ft=perl6 expandtab sw=4

0 comments on commit 046e0bf

Please sign in to comment.