diff options
author | andreas_kupries <akupries@shaw.ca> | 2008-12-11 17:27:39 (GMT) |
---|---|---|
committer | andreas_kupries <akupries@shaw.ca> | 2008-12-11 17:27:39 (GMT) |
commit | 55bf3ca3e9a9391085b86903de99f529ca28142e (patch) | |
tree | 553d3544448a4e969943ddb32f8918876bd0e50d /tests/io.test | |
parent | 0be8e1fe1558baf2361656165923b9191c37b254 (diff) | |
download | tcl-55bf3ca3e9a9391085b86903de99f529ca28142e.zip tcl-55bf3ca3e9a9391085b86903de99f529ca28142e.tar.gz tcl-55bf3ca3e9a9391085b86903de99f529ca28142e.tar.bz2 |
* generic/tclIO.c (SetChannelFromAny and related): Modified the
* tests/io.test: internal representation of the tclChannelType to
contain not only the ChannelState pointer, but also a reference to
the interpreter it was made in. Invalidate and recompute the
internal representation when it is used in a different interpreter
(Like cmdName intrep's). Added testcase. [Bug 2407783].
Diffstat (limited to 'tests/io.test')
-rw-r--r-- | tests/io.test | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/io.test b/tests/io.test index a2aaf7f..2e21e5b 100644 --- a/tests/io.test +++ b/tests/io.test @@ -13,7 +13,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.80.2.12 2008/06/20 19:23:26 dgp Exp $ +# RCS: @(#) $Id: io.test,v 1.80.2.13 2008/12/11 17:27:39 andreas_kupries Exp $ if {[catch {package require tcltest 2}]} { puts stderr "Skipping tests in [info script]. tcltest 2 required." @@ -7695,6 +7695,16 @@ test io-73.1 {channel Tcl_Obj SetChannelFromAny} {} { catch {close [lreplace [list a] 0 end]} } {1} +test io-73.2 {channel Tcl_Obj SetChannelFromAny, bug 2407783} {} { + # Invalidate intrep of 'channel' Tcl_Obj when transiting between interpreters. + interp create foo + set f [open [info script] r] + seek $f 0 + set code [catch {interp eval foo [list seek $f 0]} msg] + # The string map converts the changing channel handle to a fixed string + list $code [string map [list $f @@] $msg] +} {1 {can not find channel named "@@"}} + # ### ### ### ######### ######### ######### # cleanup |