#!./perl -w
BEGIN {
chdir 't' if -d 't';
# open2/3 supported on win32 (but not Borland due to CRT bugs)
{
print "1..0\n";
exit 0;
}
# make warnings fatal
}
use strict;
#require 'open3.pl'; use subs 'open3';
my $perl = $^X;
sub ok {
print "ok $n\n";
}
else {
print "not ok $n\n";
}
}
sub cmd_line {
my $cmd = shift;
}
else {
return $_[0];
}
}
print "1..22\n";
# basic
$| = 1;
$reaped_pid = waitpid $pid, 0;
ok 8, $reaped_pid == $pid, $reaped_pid;
ok 9, $? == 0, $?;
# read and error together, both named
$| = 1;
# read and error together, error empty
$| = 1;
# dup writer
ok 14, pipe PIPE_READ, PIPE_WRITE;
# dup reader
# dup error: This particular case, duping stderr onto the existing
# stdout but putting stdout somewhere else, is a good case because it
# used not to work.
# dup reader and error together, both named
$| = 1;
# dup reader and error together, error empty
$| = 1;
# command line in single parameter variant of open3
# for understanding of Config{'sh'} test see exec description in camel book
if ($@) {
print "error $@\n";
print "not ok 22\n";
}
else {
}