summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2016-07-18 16:46:34 (GMT)
committerdgp <dgp@users.sourceforge.net>2016-07-18 16:46:34 (GMT)
commit3766e26550a1315f09945ab1162d78d0143d32a2 (patch)
tree542c90fa64596001e6147e5f9b5d2e9145eeb38f /tests
parentc95dfd2ed336a593d21fa9098b5c82a8761b02d7 (diff)
parenta127a9e4aa8b2a9a386cd7fe694bfef8f1cf5264 (diff)
downloadtcl-3766e26550a1315f09945ab1162d78d0143d32a2.zip
tcl-3766e26550a1315f09945ab1162d78d0143d32a2.tar.gz
tcl-3766e26550a1315f09945ab1162d78d0143d32a2.tar.bz2
[104f2885bb] Rework the "chan" Tcl_ObjType to properly validate cached channel name lookups.
Diffstat (limited to 'tests')
-rw-r--r--tests/io.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/io.test b/tests/io.test
index 9573cc6..e2a05dc 100644
--- a/tests/io.test
+++ b/tests/io.test
@@ -44,6 +44,7 @@ testConstraint testfevent [llength [info commands testfevent]]
testConstraint testchannelevent [llength [info commands testchannelevent]]
testConstraint testmainthread [llength [info commands testmainthread]]
testConstraint thread [expr {0 == [catch {package require Thread 2.7-}]}]
+testConstraint testobj [llength [info commands testobj]]
# You need a *very* special environment to do some tests. In
# particular, many file systems do not support large-files...
@@ -8638,6 +8639,24 @@ test io-73.5 {effect of eof on encoding end flags} -setup {
removeFile io-73.5
} -result [list 1 1 more\u00a0data 1]
+test io-74.1 {[104f2885bb] improper cache validity check} -setup {
+ set fn [makeFile {} io-74.1]
+ set rfd [open $fn r]
+ testobj freeallvars
+ interp create slave
+} -constraints testobj -body {
+ teststringobj set 1 [string range $rfd 0 end]
+ read [teststringobj get 1]
+ testobj duplicate 1 2
+ interp transfer {} $rfd slave
+ catch {read [teststringobj get 1]}
+ read [teststringobj get 2]
+} -cleanup {
+ interp delete slave
+ testobj freeallvars
+ removeFile io-74.1
+} -returnCodes error -match glob -result {can not find channel named "*"}
+
# ### ### ### ######### ######### #########
# cleanup