Skip to content

Commit

Permalink
Add tests for RT #127101
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Dec 31, 2015
1 parent a8bbde8 commit f153dc5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion S17-promise/allof.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 12;
plan 13;

{
my $p1 = Promise.new;
Expand Down Expand Up @@ -51,4 +51,10 @@ plan 12;
ok (await Promise.allof($job1, $job2)), "start + await + allof combo, RT #122802";
}

# RT #127101
{
my $p = Promise.allof(my @promises);
is $p.status, Kept, 'an empty list should give a kept Promise';
}

throws-like { Promise.allof(42) }, X::Promise::Combinator;
8 changes: 7 additions & 1 deletion S17-promise/anyof.t
@@ -1,7 +1,7 @@
use v6;
use Test;

plan 9;
plan 10;

{
my $p1 = Promise.new;
Expand Down Expand Up @@ -31,4 +31,10 @@ plan 9;
is $pany.status, Kept, "Other promise keeping doesn't affect status";
}

# RT #127101
{
my $p = Promise.anyof(my @promises);
is $p.status, Kept, 'an empty list should give a kept Promise';
}

throws-like { Promise.anyof(42) }, X::Promise::Combinator;

0 comments on commit f153dc5

Please sign in to comment.