summaryrefslogtreecommitdiffstats
path: root/tests/interp.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2008-06-20 20:48:47 (GMT)
committerdgp <dgp@users.sourceforge.net>2008-06-20 20:48:47 (GMT)
commit8f8c4fc92943cd0497881b0185ec142142698b4b (patch)
tree2e01e8f3ad4d67843b7a70499a1f97ecf3003081 /tests/interp.test
parent64ade57c455847b103bb0bfb4545beede557043f (diff)
downloadtcl-8f8c4fc92943cd0497881b0185ec142142698b4b.zip
tcl-8f8c4fc92943cd0497881b0185ec142142698b4b.tar.gz
tcl-8f8c4fc92943cd0497881b0185ec142142698b4b.tar.bz2
* changes: Updates for 8.6a1 release.
* generic/tclInterp.c: Fixed completely boneheaded mistake that * tests/interp.test: [interp bgerror $slave] and [$slave bgerror] would always act like [interp bgerror {}]. [Bug 1999035]. * tests/chanio.test: Corrected flawed tests revealed by a -debug 1 * tests/cmdAH.test: -singleproc 1 test suite run. * tests/event.test: * tests/interp.test: * tests/io.test: * tests/ioTrans.test: * tests/namespace.test:
Diffstat (limited to 'tests/interp.test')
-rw-r--r--tests/interp.test33
1 files changed, 29 insertions, 4 deletions
diff --git a/tests/interp.test b/tests/interp.test
index 57a2020..7af5856 100644
--- a/tests/interp.test
+++ b/tests/interp.test
@@ -10,7 +10,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: interp.test,v 1.56 2008/06/13 05:45:15 mistachkin Exp $
+# RCS: @(#) $Id: interp.test,v 1.57 2008/06/20 20:48:49 dgp Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2.1
@@ -2343,9 +2343,10 @@ test interp-27.4 {interp aliases & namespaces} {
#} {1 {invalid hidden command name "foo"}}
-test interp-28.1 {getting fooled by slave's namespace ?} {
+test interp-28.1 {getting fooled by slave's namespace ?} -setup {
set i [interp create -safe];
proc master {interp args} {interp hide $interp list}
+} -body {
$i alias master master $i;
set r [interp eval $i {
namespace eval foo {
@@ -2356,9 +2357,10 @@ test interp-28.1 {getting fooled by slave's namespace ?} {
}
info commands list
}]
+} -cleanup {
+ rename master {}
interp delete $i;
- set r
-} {}
+} -result {}
test interp-28.2 {master's nsName cache should not cross} -setup {
set i [interp create]
@@ -3447,6 +3449,29 @@ test interp-36.6 {SlaveBgerror returns handler} -setup {
interp delete slave
} -result {foo bar soom}
+test interp-36.7 {SlaveBgerror sets error handler of slave [1999035]} -setup {
+ interp create slave
+ slave alias handler handler
+ slave bgerror handler
+ variable result {untouched}
+ proc handler {args} {
+ variable result
+ set result [lindex $args 0]
+ }
+} -body {
+ slave eval {
+ variable done {}
+ after 0 error foo
+ after 10 [list ::set [namespace which -variable done] {}]
+ vwait [namespace which -variable done]
+ }
+ set result
+} -cleanup {
+ variable result {}
+ unset result
+ interp delete slave
+} -result foo
+
# cleanup
foreach i [interp slaves] {
interp delete $i