From 0c31f3707bcc31e66a05c989280013dfe3802b22 Mon Sep 17 00:00:00 2001 From: Miguel Sofer Date: Fri, 23 Feb 2001 21:41:01 +0000 Subject: added test for evaluation of an expression in a variable; evals once by compiling, second time using the previous compilation --- tests/execute.test | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/execute.test b/tests/execute.test index 4b11822..e82ac57 100644 --- a/tests/execute.test +++ b/tests/execute.test @@ -14,7 +14,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: execute.test,v 1.8 2000/04/10 17:18:58 ericm Exp $ +# RCS: @(#) $Id: execute.test,v 1.9 2001/02/23 21:41:01 msofer Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest @@ -583,6 +583,12 @@ test execute-6.1 {UpdateStringOfCmdName: called for duplicate of empty cmdName o p } {} +test execute-6.2 {Evaluate an expression in a variable; compile the first time, do not the second} { + set w {3*5} + proc a {obj} {expr $obj} + set res "[a $w]:[a $w]" +} {15:15} + # cleanup catch {eval namespace delete [namespace children :: test_ns_*]} catch {rename foo ""} -- cgit v0.12