Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Test for RT #127629.
  • Loading branch information
jnthn committed Mar 9, 2016
1 parent cf3374d commit 23c1c1b
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion S17-supply/Channel.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 12;
plan 14;

dies-ok { Supply.Channel }, 'can not be called as a class method';

Expand Down Expand Up @@ -34,4 +34,21 @@ $s.emit($_) for ^$times;
await $promise;
is $done, $times, 'did we receive all?';

# RT #127629
{
my $r = Supplier.new;
my $s = $r.Supply;
my $c = $s.Channel;
my $p = start {
for @$c { }
}
for 1..4 {
$r.emit($_);
}
$r.quit(X::AdHoc.new(:payload('le supply quit')));
try await $p;
ok $p.status == Broken, 'Supply.Channel passes on quit of supply';
is $p.cause.message, 'le supply quit', 'Correct message';
}

# vim: ft=perl6 expandtab sw=4

0 comments on commit 23c1c1b

Please sign in to comment.