Skip to content

Commit

Permalink
Test incorrect .tap sig dies
Browse files Browse the repository at this point in the history
  • Loading branch information
zoffixznet committed Jan 1, 2018
1 parent e5b4f37 commit 42d7d74
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion t/05-messages/02-errors.t
Expand Up @@ -2,7 +2,7 @@ use lib <t/packages/>;
use Test;
use Test::Helpers;

plan 24;
plan 26;

# RT #132295

Expand Down Expand Up @@ -182,4 +182,13 @@ subtest 'USAGE with subsets/where and variables with quotes' => {
:message(/'should be in 0..0' .+ '*-1000'/);
}

for ThreadPoolScheduler.new, CurrentThreadScheduler -> $*SCHEDULER {
# RT #126379
is-run q[Supply.interval(1).tap(-> { say 'hi' }); sleep 3;],
:1exitcode, :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 42d7d74

Please sign in to comment.