summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Term/Filter.pm5
-rw-r--r--t/basic.t2
-rw-r--r--t/callbacks.t9
-rw-r--r--t/extra-pty.t7
-rw-r--r--t/role.t9
5 files changed, 23 insertions, 9 deletions
diff --git a/lib/Term/Filter.pm b/lib/Term/Filter.pm
index 8f4fc32..3106bab 100644
--- a/lib/Term/Filter.pm
+++ b/lib/Term/Filter.pm
@@ -344,10 +344,7 @@ no Moose::Util::TypeConstraints;
=head1 BUGS
-The test suite is a bit flaky, due to it being hard to test orderings of things
-between multiple layers of read/write syscalls across multiple processes. As
-far as I can tell, the module itself works fine, but may just get some false
-negative test results on occasion. Need to fix this eventually.
+No known bugs.
Please report any bugs through RT: email
C<bug-term-filter at rt.cpan.org>, or browse to
diff --git a/t/basic.t b/t/basic.t
index 13e77f3..4c72512 100644
--- a/t/basic.t
+++ b/t/basic.t
@@ -18,7 +18,7 @@ SCRIPT
my $crlf = "\x0d\x0a";
-$pty->spawn($^X, (map { "-I $_" } @INC), '-e', $script);
+$pty->spawn($^X, (map {; '-I', $_ } @INC), '-e', $script);
# just in case
alarm 60;
diff --git a/t/callbacks.t b/t/callbacks.t
index cb99c18..250fec7 100644
--- a/t/callbacks.t
+++ b/t/callbacks.t
@@ -49,7 +49,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);
my $setup_str = full_read($pty);
@@ -73,12 +73,19 @@ alarm 60;
^
MUNGE_INPUT: \s \Q$term_str\E \s \($ref\): \s fOo\n
\n
+ (?:
MUNGE_OUTPUT: \s \Q$term_str\E \s \($ref\): \s FOO$crlf
\n
foo$crlf
MUNGE_OUTPUT: \s \Q$term_str\E \s \($ref\): \s FOO$crlf
\n
foo$crlf
+ |
+ MUNGE_OUTPUT: \s \Q$term_str\E \s \($ref\): \s FOO$crlf FOO$crlf
+ \n
+ foo$crlf
+ foo$crlf
+ )
$
}sx,
"munge_input and munge_output got the right arguments"
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");
diff --git a/t/role.t b/t/role.t
index e8e9806..25cfec0 100644
--- a/t/role.t
+++ b/t/role.t
@@ -58,7 +58,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);
my $setup_str = full_read($pty);
@@ -82,12 +82,19 @@ alarm 60;
^
MUNGE_INPUT: \s \Q$term_str\E \s \($ref\): \s fOo\n
\n
+ (?:
MUNGE_OUTPUT: \s \Q$term_str\E \s \($ref\): \s FOO$crlf
\n
foo$crlf
MUNGE_OUTPUT: \s \Q$term_str\E \s \($ref\): \s FOO$crlf
\n
foo$crlf
+ |
+ MUNGE_OUTPUT: \s \Q$term_str\E \s \($ref\): \s FOO$crlf FOO$crlf
+ \n
+ foo$crlf
+ foo$crlf
+ )
$
}sx,
"munge_input and munge_output got the right arguments"