From e1b070276d8c8beb0dcc76bc2c2ac070564e0c24 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Wed, 7 Mar 2012 02:21:48 -0600 Subject: make the test suite more reliable --- t/extra-pty.t | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 't/extra-pty.t') diff --git a/t/extra-pty.t b/t/extra-pty.t index d2e013a..8393f4f 100644 --- a/t/extra-pty.t +++ b/t/extra-pty.t @@ -70,7 +70,7 @@ alarm 60; { my $pty = IO::Pty::Easy->new(handle_pty_size => 0); - $pty->spawn($^X, (map { "-I $_" } @INC), '-e', $script); + $pty->spawn($^X, (map {; '-I', $_ } @INC), '-e', $script); open my $readfh, '>', $readp or die "can't open pipe (parent): $!"; @@ -87,7 +87,10 @@ alarm 60; sysread($writefh, $buf, 21); is($buf, "read from term: foo$crlf"); sysread($writefh, $buf, 21); - is($buf, "read from term: foo$crlf"); + # note that this could either happen as a second write, or as part + # of the first write (in which case, this read finishes reading + # the rest of the data that was sent previously) + like($buf, qr/^(?:read from term: )?foo\Q$crlf\E$/); } syswrite($readfh, "bar"); -- cgit v1.2.3-54-g00ecf