summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2000-12-01 20:55:41 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2000-12-01 20:55:41 +0000
commit9e0e974cbc3ea3978a206d172cf39b02f5fd2a22 (patch)
tree50bcf5cda4e2ed35a2447d87ba301b6613a4010a /t
parentd87737098aa3752eef064f4ae46efc75f2e59d80 (diff)
parent6860670169e528ed531497d94f75e8a461fde7e3 (diff)
downloadperl-9e0e974cbc3ea3978a206d172cf39b02f5fd2a22.tar.gz
Integrate perlio:
[ 7942] 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-link: @7942 on //depot/perlio: 5e2ab84baab5f2372dc1ffda47d5b89faa2613cd p4raw-id: //depot/perl@7947
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";
+ }
}
}