summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorNick Ing-Simmons <nik@tiuk.ti.com>2000-12-01 17:56:46 +0000
committerNick Ing-Simmons <nik@tiuk.ti.com>2000-12-01 17:56:46 +0000
commit5e2ab84baab5f2372dc1ffda47d5b89faa2613cd (patch)
tree293e0bb7d3a5ad517718a0b77921558e3dd115d1 /t
parenta4d3c1d3a59a079ee84191d2df8b5e232a8bee44 (diff)
downloadperl-5e2ab84baab5f2372dc1ffda47d5b89faa2613cd.tar.gz
Fix 'mmap' lib/filehand.t (ungetc) test fail.
Make 'unix' pass most tests - do unread by temporary push of layer ("pending") holding unread chars - fast_gets is now based on per-handle flag - relax one of io/pipe.t tests to allow print to fail and close to succeed so that it passes on unbuffered "unix" layer. Remaining fail is sporadic and a genuine race condition between parent/child in fork test. p4raw-id: //depot/perlio@7942
Diffstat (limited to 't')
-rwxr-xr-xt/io/pipe.t19
1 files changed, 15 insertions, 4 deletions
diff --git a/t/io/pipe.t b/t/io/pipe.t
index 96935e3f88..95cdd5587e 100755
--- a/t/io/pipe.t
+++ b/t/io/pipe.t
@@ -99,12 +99,23 @@ else {
local $SIG{PIPE} = 'IGNORE';
open NIL, '|true' or die "open failed: $!";
sleep 5;
- print NIL 'foo' or die "print failed: $!";
- if (close NIL) {
- print "not ok 9\n";
+ if (print NIL 'foo') {
+ # If print was allowed we had better get an error on close
+ if (close NIL) {
+ print "not ok 9\n";
+ }
+ else {
+ print "ok 9\n";
+ }
}
else {
- print "ok 9\n";
+ # If print failed, the close should be clean
+ if (close NIL) {
+ print "ok 9\n";
+ }
+ else {
+ print "not ok 9\n";
+ }
}
}