Skip to content

Commit

Permalink
Implement tests for Supply.comb(Str)
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed Jan 16, 2020
1 parent 410f9c4 commit cd7d5b6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion S17-supply/comb.t
Expand Up @@ -6,7 +6,7 @@ use Test::Tap;
my @source = <old dog jumpso>;
my @schedulers = ThreadPoolScheduler.new, CurrentThreadScheduler;

plan @schedulers * 9;
plan @schedulers * 11;

for @schedulers -> $*SCHEDULER {
diag "**** scheduling with {$*SCHEDULER.WHAT.raku}";
Expand Down Expand Up @@ -34,6 +34,14 @@ for @schedulers -> $*SCHEDULER {
tap-ok Supply.from-list(@source).comb(20),
['olddogjumpso'],
"comb a simple list of words for 20 chars at a time";

tap-ok Supply.from-list(@source).comb('o'),
[<o o o>],
"comb a simple list of words for a Str needle";

tap-ok Supply.from-list(@source).comb('z'),
[],
"comb a simple list of words for a Str needle that is not there";
}

# vim: ft=perl6 expandtab sw=4

0 comments on commit cd7d5b6

Please sign in to comment.