Skip to content

Commit

Permalink
Merge branch 'master' into curli
Browse files Browse the repository at this point in the history
  • Loading branch information
niner committed Nov 24, 2015
2 parents 0367fa9 + b727ecc commit ea09e0b
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion S17-supply/lines.t
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ my @simple = <a b c d e>;
my @original;
my @endings = "\n", "\r", "\r\n";

plan 21;
plan 23;

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

Expand Down Expand Up @@ -76,4 +76,18 @@ for ThreadPoolScheduler.new, CurrentThreadScheduler -> $*SCHEDULER {
$s.done;
} );
}

# See 97b93c3.
{
my $s = Supply.new;
#?rakudo.jvm todo '\r\n not yet handled as grapheme'
my $l = $s.lines(:!chomp);
my @res;
$l.tap({ @res.push: $_ });
$s.emit("a\r");
$s.emit("\n");
for ^50 { last if @res; sleep .1 }
is-deeply(@res, ["a\r\n"], "handle chunked line endings");
$s.done;
}
}

0 comments on commit ea09e0b

Please sign in to comment.