summaryrefslogtreecommitdiffstats
path: root/tests/ioCmd.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-03-27 19:14:01 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-03-27 19:14:01 (GMT)
commit6ac66b5476ec23884fe563774356fe0f468e0315 (patch)
tree6232cd636dc535c6aee83de5b03bf83bec370cc7 /tests/ioCmd.test
parent4252a9c1914c1757242a0cd83112750822e5c1a3 (diff)
downloadtcl-6ac66b5476ec23884fe563774356fe0f468e0315.zip
tcl-6ac66b5476ec23884fe563774356fe0f468e0315.tar.gz
tcl-6ac66b5476ec23884fe563774356fe0f468e0315.tar.bz2
Test iocmd-23.11 demos another segfault.
Diffstat (limited to 'tests/ioCmd.test')
-rw-r--r--tests/ioCmd.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 768a748..262be9b 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -1013,6 +1013,21 @@ 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]
+ close $c
+ rename foo {}
+ set res
+} -result {{read rc* 4096} {read rc* 4096} snarfsnarf}
# --- === *** ###########################
# method write