From ee5192e7df744668001d9976560faa2de885e014 Mon Sep 17 00:00:00 2001 From: hobbs Date: Tue, 11 Sep 2001 18:26:27 +0000 Subject: reworked stack-2.1 to be impervious to interp state --- tests/stack.test | 12 +++++++----- 1 file 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?)} -- cgit v0.12