diff options
author | dgp <dgp@users.sourceforge.net> | 2014-07-02 16:30:41 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2014-07-02 16:30:41 (GMT) |
commit | 39e6f78e7e0d68f819a0b6ecb73e8f66a743b759 (patch) | |
tree | cf02db710ac9fbe3147594dce8f7371284f902e5 /tests/io.test | |
parent | c0edc29d67c0944180ce922c7f63d6dd3c3bdf6c (diff) | |
parent | c3898a2da7b81e2c38a0b66ef3fe54ae0272d2f5 (diff) | |
download | tcl-39e6f78e7e0d68f819a0b6ecb73e8f66a743b759.zip tcl-39e6f78e7e0d68f819a0b6ecb73e8f66a743b759.tar.gz tcl-39e6f78e7e0d68f819a0b6ecb73e8f66a743b759.tar.bz2 |
[c31ca233ca] Fix TclGetsObjBinary() so that each [gets] rediscovers whether
a nonblocking channel is blocked.
Diffstat (limited to 'tests/io.test')
-rw-r--r-- | tests/io.test | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/io.test b/tests/io.test index cf38a1b..c3aaa86 100644 --- a/tests/io.test +++ b/tests/io.test @@ -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 |