summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@noemail.net>2014-07-02 16:20:30 (GMT)
committerdgp <dgp@noemail.net>2014-07-02 16:20:30 (GMT)
commit57aca419d1a17ea6447106d62b6c061314d2ba5a (patch)
treed0c8941599686cd2f946a53d19d3df8910fed610 /tests
parentdb15e8ceaf3c3c876e67009bcfffa965cbced59e (diff)
downloadtcl-57aca419d1a17ea6447106d62b6c061314d2ba5a.zip
tcl-57aca419d1a17ea6447106d62b6c061314d2ba5a.tar.gz
tcl-57aca419d1a17ea6447106d62b6c061314d2ba5a.tar.bz2
[c31ca233ca] Fix TclGetsObjBinary() so that each [gets] rediscovers whether
a nonblocking channel is blocked. FossilOrigin-Name: 6694ecd6d0c5a236781f86fba0f1ff122ab7d998
Diffstat (limited to 'tests')
-rw-r--r--tests/io.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/io.test b/tests/io.test
index a1625ba..c1938a1 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -4921,6 +4921,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