summaryrefslogtreecommitdiff
path: root/ext/IPC-Open3
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-12-20 14:02:39 +0000
committerNicholas Clark <nick@ccl4.org>2010-12-20 14:02:39 +0000
commit589b000b69e1acf012e908b6e6ef1dd06eb248a5 (patch)
tree69678b80c092e508f304c98e5fa830b19d1b3c92 /ext/IPC-Open3
parent4b2d6671441f6d60f1172ea0d86756fea9c01181 (diff)
downloadperl-589b000b69e1acf012e908b6e6ef1dd06eb248a5.tar.gz
Tweak IPC-Open3.t to cope with \r\n line endings on Win32.
The refactoring of bd29e8c290c68f4f to use Test::More broke the tests on Win32, because it didn't realise that the previous code was relying on the test harness being line ending agnostic.
Diffstat (limited to 'ext/IPC-Open3')
-rw-r--r--ext/IPC-Open3/t/IPC-Open3.t10
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/IPC-Open3/t/IPC-Open3.t b/ext/IPC-Open3/t/IPC-Open3.t
index 613ab7b8e3..9bc80da1dc 100644
--- a/ext/IPC-Open3/t/IPC-Open3.t
+++ b/ext/IPC-Open3/t/IPC-Open3.t
@@ -61,9 +61,9 @@ $pid = open3 'WRITE', 'READ', 'READ', $perl, '-e', cmd_line(<<'EOF');
print STDERR scalar <STDIN>;
EOF
print WRITE "$desc\n";
-is(scalar <READ>, "$desc\n");
+like(scalar <READ>, qr/\A$desc\r?\n\z/);
print WRITE "$desc [again]\n";
-is(scalar <READ>, "$desc [again]\n");
+like(scalar <READ>, qr/\A$desc \[again\]\r?\n\z/);
waitpid $pid, 0;
$desc = "read and error together, error empty";
@@ -73,9 +73,9 @@ $pid = open3 'WRITE', 'READ', '', $perl, '-e', cmd_line(<<'EOF');
print STDERR scalar <STDIN>;
EOF
print WRITE "$desc\n";
-is(scalar <READ>, "$desc\n");
+like(scalar <READ>, qr/\A$desc\r?\n\z/);
print WRITE "$desc [again]\n";
-is(scalar <READ>, "$desc [again]\n");
+like(scalar <READ>, qr/\A$desc \[again\]\r?\n\z/);
waitpid $pid, 0;
is(pipe(PIPE_READ, PIPE_WRITE), 1);
@@ -84,7 +84,7 @@ $pid = open3 '<&PIPE_READ', 'READ', '',
close PIPE_READ;
print PIPE_WRITE "dup writer\n";
close PIPE_WRITE;
-is(scalar <READ>, "dup writer\n");
+like(scalar <READ>, qr/\Adup writer\r?\n\z/);
waitpid $pid, 0;
my $TB = Test::Builder->new();