summaryrefslogtreecommitdiffstats
path: root/tests/ioCmd.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-04-16 20:11:05 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-04-16 20:11:05 (GMT)
commite827fc803e4afed0de2b1f9b37cd53379ef7118b (patch)
tree0cb51679567890cb745a261b7066f96262f8b372 /tests/ioCmd.test
parent60a84571795909d2b51dff06349107716ae3ab6d (diff)
parentca6f13bb3001d560ccd18ff40400afca249ebe28 (diff)
downloadtcl-e827fc803e4afed0de2b1f9b37cd53379ef7118b.zip
tcl-e827fc803e4afed0de2b1f9b37cd53379ef7118b.tar.gz
tcl-e827fc803e4afed0de2b1f9b37cd53379ef7118b.tar.bz2
merge 8.5
Diffstat (limited to 'tests/ioCmd.test')
-rw-r--r--tests/ioCmd.test33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 768a748..f021ade 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -755,6 +755,25 @@ test iocmd-21.19 {chan create, init failure -> no channel, no finalize} -match g
rename foo {}
set res
} -result {{} {initialize rc* {read write}} 1 {*all required methods*} {}}
+test iocmd-21.20 {Bug 88aef05cda} -setup {
+ proc foo {method chan args} {
+ switch -- $method blocking {
+ chan configure $chan -blocking [lindex $args 0]
+ return
+ } initialize {
+ return {initialize finalize watch blocking read write
+ configure cget cgetall}
+ } finalize {
+ return
+ }
+ }
+ set ch [chan create {read write} foo]
+} -body {
+ list [catch {chan configure $ch -blocking 0} m] $m
+} -cleanup {
+ close $ch
+ rename foo {}
+} -match glob -result {1 {*nested eval*}}
# --- --- --- --------- --------- ---------
# Helper commands to record the arguments to handler methods.
@@ -1013,6 +1032,20 @@ test iocmd-23.10 {chan read, EAGAIN means no data, yet no eof either} -match glo
rename foo {}
unset res
} -result {{read rc* 4096} {} 0}
+test iocmd-23.11 {chan read, close pulls the rug out} -match glob -body {
+ set res {}
+ proc foo {args} {
+ oninit; onfinal; track
+ set args [lassign $args sub id]
+ if {$sub ne "read"} {return}
+ close $id
+ return {}
+ }
+ set c [chan create {r} foo]
+ note [read $c]
+ rename foo {}
+ set res
+} -result {{read rc* 4096} {}}
# --- === *** ###########################
# method write