Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More Proc::Async tests
  • Loading branch information
moritz committed Jan 25, 2015
1 parent 67bb8b3 commit d591ae5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions S17-procasync/basic.t
Expand Up @@ -2,7 +2,7 @@ use v6;

use Test;

plan 24;
plan 26;

my $pc = $*DISTRO.is-win
?? Proc::Async.new( 'cmd', </c echo Hello World> )
Expand Down Expand Up @@ -53,7 +53,7 @@ throws_like { $pc.write(Buf.new(0)) }, X::Proc::Async::MustBeStarted, :method<wr
$stdout = '';
$stderr = '';
$pc.stdout.act: { $stdout ~= $_.subst("\r", "", :g) };
$pc.stdout.act: { $stderr ~= $_.subst("\r", "", :g) };
$pc.stderr.act: { $stderr ~= $_.subst("\r", "", :g) };

throws_like { $pc.stdout(:bin) }, X::Proc::Async::CharsOrBytes, :handle<stdout>;

Expand All @@ -71,3 +71,6 @@ is $start-promise.status, Planned, 'external program still running (stdin still
$pc.close-stdin;

isa_ok $start-promise.result, Proc::Status, 'Can finish, return Proc::Statu';

is $stdout, 'Perl 6', 'got correct STDOUT';
is $stderr, '', 'got correct STDERR';

0 comments on commit d591ae5

Please sign in to comment.