summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-03-27 19:15:19 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-03-27 19:15:19 (GMT)
commite29ec23cfcb4b4a117052e22d9c8b4377c5acad1 (patch)
tree828d1f0f156322f1c6e2d95b6cead17ca528ce69 /tests
parentced9a82b7f9ee609c525fbe2e9abca12b708c454 (diff)
parentbb3eb0aaa60aba47a0e857fa2e34e5eb7ba8263f (diff)
downloadtcl-e29ec23cfcb4b4a117052e22d9c8b4377c5acad1.zip
tcl-e29ec23cfcb4b4a117052e22d9c8b4377c5acad1.tar.gz
tcl-e29ec23cfcb4b4a117052e22d9c8b4377c5acad1.tar.bz2
Test iocmd-23.11 demos another segfault.
Diffstat (limited to 'tests')
-rw-r--r--tests/ioCmd.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ioCmd.test b/tests/ioCmd.test
index 03242be..e3776bf 100644
--- a/tests/ioCmd.test
+++ b/tests/ioCmd.test
@@ -1051,6 +1051,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