summaryrefslogtreecommitdiffstats
path: root/tests/io.test
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2014-07-12 16:15:22 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2014-07-12 16:15:22 (GMT)
commit985b5f8a7463d8ef8400d49bceb87b402ed70e59 (patch)
tree488c380d0ec7f4f0e06a4eda59cfddabf2bcc0e3 /tests/io.test
parent7bea42569d8c2ccb8584155f706392d5812ec428 (diff)
parent74d71bafde63ca49cecadc990df7b3a2d7797849 (diff)
downloadtcl-bug_d5ddbc7f49.zip
tcl-bug_d5ddbc7f49.tar.gz
tcl-bug_d5ddbc7f49.tar.bz2
merge trunkbug_d5ddbc7f49
Diffstat (limited to 'tests/io.test')
-rw-r--r--tests/io.test22
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/io.test b/tests/io.test
index 26be64e..0a27ac7 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -4076,7 +4076,7 @@ test io-32.11.1 {Tcl_Read from a pipe} {stdio openpipe} {
} {{hello
} {hello
}}
-test io-32.11.1 {Tcl_Read from a pipe} {stdio openpipe} {
+test io-32.11.2 {Tcl_Read from a pipe} {stdio openpipe} {
file delete $path(pipe)
set f1 [open $path(pipe) w]
puts $f1 {chan configure stdout -translation crlf}
@@ -4945,6 +4945,26 @@ test io-36.1 {Tcl_InputBlocked on nonblocking pipe} {stdio openpipe} {
close $f1
set x
} {{} 1 hello 0 {} 1}
+test io-36.1.1 {Tcl_InputBlocked on nonblocking binary pipe} {stdio openpipe} {
+ set f1 [open "|[list [interpreter]]" r+]
+ chan configure $f1 -encoding binary -translation lf -eofchar {}
+ puts $f1 {puts hello_from_pipe}
+ flush $f1
+ gets $f1
+ fconfigure $f1 -blocking off -buffering full
+ puts $f1 {puts hello}
+ set x ""
+ lappend x [gets $f1]
+ lappend x [fblocked $f1]
+ flush $f1
+ after 200
+ lappend x [gets $f1]
+ lappend x [fblocked $f1]
+ lappend x [gets $f1]
+ lappend x [fblocked $f1]
+ close $f1
+ set x
+} {{} 1 hello 0 {} 1}
test io-36.2 {Tcl_InputBlocked on blocking pipe} {stdio openpipe} {
set f1 [open "|[list [interpreter]]" r+]
fconfigure $f1 -buffering line