summaryrefslogtreecommitdiffstats
path: root/t/extra-pty.t
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2012-03-07 02:21:48 -0600
committerJesse Luehrs <doy@tozt.net>2012-03-07 02:22:11 -0600
commite1b070276d8c8beb0dcc76bc2c2ac070564e0c24 (patch)
tree374f819db920957ea47cfc59dffa2b824e3d1a59 /t/extra-pty.t
parent029d7083452d578ab264b9525e045d238187c511 (diff)
downloadterm-filter-e1b070276d8c8beb0dcc76bc2c2ac070564e0c24.tar.gz
term-filter-e1b070276d8c8beb0dcc76bc2c2ac070564e0c24.zip
make the test suite more reliable
Diffstat (limited to 't/extra-pty.t')
-rw-r--r--t/extra-pty.t7
1 files changed, 5 insertions, 2 deletions
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");