summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2001-09-11 18:23:45 (GMT)
committerhobbs <hobbs>2001-09-11 18:23:45 (GMT)
commit663339fe5a7626a725e32d712789a242a5400a13 (patch)
treec417d0d17ac87c5722b0395767939dc7380afa29
parent39338c0ce847fc4313b437fd8db57765804496d7 (diff)
downloadtcl-663339fe5a7626a725e32d712789a242a5400a13.zip
tcl-663339fe5a7626a725e32d712789a242a5400a13.tar.gz
tcl-663339fe5a7626a725e32d712789a242a5400a13.tar.bz2
reworked stack-2.1 to be impervious to interp state
-rw-r--r--tests/stack.test12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/stack.test b/tests/stack.test
index 07d689b..165b782 100644
--- a/tests/stack.test
+++ b/tests/stack.test
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: stack.test,v 1.8.2.2 2001/09/11 00:53:27 hobbs Exp $
+# RCS: @(#) $Id: stack.test,v 1.8.2.3 2001/09/11 18:23:45 hobbs Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -46,10 +46,12 @@ test stack-1.1 {maxNestingDepth reached on infinite recursion} {minStack2400} {
} {too many nested calls to Tcl_EvalObj (infinite loop?)}
test stack-2.1 {maxNestingDepth reached on infinite recursion} {minStack2400} {
- catch {rename unknown unknown_safe}
- interp alias {} unknown {} notaknownproc
- catch {foo} msg
- catch {rename unknown {} ; rename unknown_safe unknown}
+ # do this in a slave to not mess with parent
+ set slave stack-2.1
+ interp create $slave
+ $slave eval { interp alias {} unknown {} notaknownproc }
+ set msg [$slave eval { catch {foo} msg ; set msg }]
+ interp delete $slave
set msg
} {too many nested calls to AliasObjCmd (infinite loop using alias?)}