From 5eab8070cba0f8feba78bddcd68bc6028a0a00e3 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 7 Mar 2012 03:02:04 -0600 Subject: make this test a bit more reliable --- t/basic.t | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/t/basic.t b/t/basic.t index 977ccc5..abad5c2 100644 --- a/t/basic.t +++ b/t/basic.t @@ -68,14 +68,17 @@ fail if length($current_frame_data); fail if $current_frame_idx != 3; sub full_read { - my ($pty) = @_; + my ($fh) = @_; - my $select = IO::Select->new($pty); + my $select = IO::Select->new($fh); return if $select->has_exception(0.1); + 1 while !$select->can_read(1); + my $ret; while ($select->can_read(1)) { - my $new = $pty->read; + my $new; + sysread($fh, $new, 4096); last unless defined($new) && length($new); $ret .= $new; return $ret if $select->has_exception(0.1); -- cgit v1.2.3-54-g00ecf