diff options
author | stanton <stanton> | 1998-11-11 04:08:12 (GMT) |
---|---|---|
committer | stanton <stanton> | 1998-11-11 04:08:12 (GMT) |
commit | 131c68d85079ca5a553b28fef489cf29b79f1176 (patch) | |
tree | 7e89676f31bb688b2686f508446e3282e7148a05 /tests/io.test | |
parent | 0a41c61107c36da0a8e4ca0fc259149e3bc1956d (diff) | |
download | tcl-131c68d85079ca5a553b28fef489cf29b79f1176.zip tcl-131c68d85079ca5a553b28fef489cf29b79f1176.tar.gz tcl-131c68d85079ca5a553b28fef489cf29b79f1176.tar.bz2 |
merged 8.0.4 into 8.1
Diffstat (limited to 'tests/io.test')
-rw-r--r-- | tests/io.test | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/tests/io.test b/tests/io.test index d90d1c0..cd0c06d 100644 --- a/tests/io.test +++ b/tests/io.test @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: io.test,v 1.1.2.2 1998/09/24 23:59:27 stanton Exp $ +# RCS: @(#) $Id: io.test,v 1.1.2.3 1998/11/11 04:08:30 stanton Exp $ if {[string compare test [info procs test]] == 1} then {source defs} @@ -6705,8 +6705,8 @@ test io-34.2 {buffered data and file events, read} { proc accept {sock args} { set ::s2 $sock } - set server [socket -server accept 4040] - set s [socket localhost 4040] + set server [socket -server accept 4041] + set s [socket localhost 4041] vwait s2 update fileevent $s2 readable {lappend result readable} @@ -6723,6 +6723,31 @@ test io-34.2 {buffered data and file events, read} { set result } {1 readable 234567890 timer} +test io-35.1 {Tcl_NotifyChannel and error when closing} {unixOrPc} { + set out [open script w] + puts $out { + puts "normal message from pipe" + puts stderr "error message from pipe" + exit 1 + } + proc readit {pipe} { + global x result + if {[eof $pipe]} { + set x [catch {close $pipe} line] + lappend result catch $line + } else { + gets $pipe line + lappend result gets $line + } + } + close $out + set pipe [open "|[list $tcltest] script" r] + fileevent $pipe readable [list readit $pipe] + set x "" + set result "" + vwait x + list $x $result +} {1 {gets {normal message from pipe} gets {} catch {error message from pipe}}} removeFile fooBar |