diff options
author | hobbs <hobbs@noemail.net> | 2001-09-11 18:26:27 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2001-09-11 18:26:27 (GMT) |
commit | a6e9fd85e19c336ee9a0d6754e8c92d14a7b8aff (patch) | |
tree | 426a50c165bd410e21f127543520813f02772fbb /tests | |
parent | e9d9e18e3ff04b521c1cc95c58c29a87a69e885c (diff) | |
download | tcl-a6e9fd85e19c336ee9a0d6754e8c92d14a7b8aff.zip tcl-a6e9fd85e19c336ee9a0d6754e8c92d14a7b8aff.tar.gz tcl-a6e9fd85e19c336ee9a0d6754e8c92d14a7b8aff.tar.bz2 |
reworked stack-2.1 to be impervious to interp state
FossilOrigin-Name: 79f6c28369ace3dcb7f3b90b0a6f017dbc317137
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stack.test | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/stack.test b/tests/stack.test index 1d1bdce..fef667e 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.10 2001/09/11 00:46:35 hobbs Exp $ +# RCS: @(#) $Id: stack.test,v 1.11 2001/09/11 18:26:27 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?)} |