summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2003-05-11 16:43:26 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2003-05-11 16:43:26 +0000
commit6a92418585632730a32c9109c63df3e9d3d8a61f (patch)
tree39827b837fa0ef08b7d7d1c61c5a0a564daf83ae /t
parent23f519f064273e3cc195f02d4e0e49cf7c9329a8 (diff)
parenta6dd04483cb30505dd31342b8e0d790b3545179d (diff)
downloadperl-6a92418585632730a32c9109c63df3e9d3d8a61f.tar.gz
Integrate from perlio:
[ 19474] Tweaks to Jarkko's NULL deref checks in perlio.c [ 19475] Fix for bugs 21717 and 22140. Win32's lseek claims to have succeeded in pipes etc. Which confuses :perlio and derived layers. So have :unix's "pushed" method stat() the fd and cache non S_ISREG nature. Have Unix_seek fail if fd is NOT S_ISREG to match UNIX behaviour. [ 19479] Better but still unproven fix for lseek() on pipes. [ 19483] Unused variable [ 19485] Tests to prove Ticket 9468 is fixed. [ 19486] add test for change#19475,19479 (bugs#21717,22140) p4raw-link: @19486 on //depot/perlio: a6dd04483cb30505dd31342b8e0d790b3545179d p4raw-link: @19485 on //depot/perlio: 317758861cdb698a2ee0bd53db0677ccd65a9eb2 p4raw-link: @19483 on //depot/perlio: acbd16bfa8cc0ce2f8cf72ca650c798b69c28dcc p4raw-link: @19479 on //depot/perlio: aa063c351bd93493dd45b11fa59e0e5a90b4b421 p4raw-link: @19475 on //depot/perlio: 6caa5a9cfe39f91bc44bba937a0b491f754fe9cd p4raw-link: @19474 on //depot/perlio: 37725cdcc38b517ef70773e843427b086c3d89e1 p4raw-id: //depot/perl@19487
Diffstat (limited to 't')
-rwxr-xr-xt/io/dup.t22
-rw-r--r--t/io/fflush.t17
2 files changed, 34 insertions, 5 deletions
diff --git a/t/io/dup.t b/t/io/dup.t
index 6e7d121848..21add4f0f4 100755
--- a/t/io/dup.t
+++ b/t/io/dup.t
@@ -6,7 +6,7 @@ BEGIN {
}
my $test = 1;
-print "1..8\n";
+print "1..12\n";
print "ok 1\n";
open(DUPOUT,">&STDOUT");
@@ -33,7 +33,7 @@ print `$cmd`;
# KNOWN BUG system() does not honor STDOUT redirections on VMS.
if( $^O eq 'VMS' ) {
- print "not ok $_ # TODO system() not honoring STDOUT redirect on VMS\n"
+ print "not ok $_ # TODO system() not honoring STDOUT redirect on VMS\n"
for 6..7;
}
else {
@@ -59,3 +59,21 @@ unlink 'Io.dup';
print STDOUT "ok 8\n";
+open(F,">&",1) or die "Cannot dup to numeric 1:$!";
+print F "ok 9\n";
+close(F);
+
+open(F,">&",'1') or die "Cannot dup to string '1':$!";
+print F "ok 10\n";
+close(F);
+
+
+open(F,">&=",1) or die "Cannot dup to numeric 1:$!";
+print F "ok 11\n";
+close(F);
+
+open(F,">&=",'1') or die "Cannot dup to string '1':$!";
+print F "ok 12\n";
+close(F);
+
+
diff --git a/t/io/fflush.t b/t/io/fflush.t
index fbf6b47fe1..eab9a01c97 100644
--- a/t/io/fflush.t
+++ b/t/io/fflush.t
@@ -23,17 +23,19 @@ my $fflushall = defined $Config{fflushall} ? $Config{fflushall} eq 'define' ? 1
my $d_fork = defined $Config{d_fork} ? $Config{d_fork} eq 'define' ? 1 : 0 : 0;
if ($useperlio || $fflushNULL || $d_sfio) {
- print "1..4\n";
+ print "1..7\n";
} else {
if ($fflushall) {
- print "1..4\n";
+ print "1..7\n";
} else {
print "1..0 # Skip: fflush(NULL) or equivalent not available\n";
exit;
}
}
-my $runperl = qq{$^X "-I../lib"};
+my $runperl = $^X =~ m/\s/ ? qq{"$^X"} : $^X;
+$runperl .= qq{ "-I../lib"};
+
my @delete;
END {
@@ -129,3 +131,12 @@ for (qw(system qx popen)) {
push @delete, $f;
++$t;
}
+
+my $cmd = qq[$runperl -e "print qq[ok \$_\\n] for ($t..$t+2)"];
+open my $CMD, "$cmd |" or die "Can't open pipe to '$cmd': $!";
+while (<$CMD>) {
+ system("$runperl -e 0");
+ print;
+}
+close $CMD;
+$t += 3;