summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2001-02-23 21:41:01 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2001-02-23 21:41:01 (GMT)
commit0c31f3707bcc31e66a05c989280013dfe3802b22 (patch)
tree8393b97a50532bf1d88384a209ae4ec2af706f6c
parentf10e4a736ff04cc548c7681c07612afddc4acbb5 (diff)
downloadtcl-0c31f3707bcc31e66a05c989280013dfe3802b22.zip
tcl-0c31f3707bcc31e66a05c989280013dfe3802b22.tar.gz
tcl-0c31f3707bcc31e66a05c989280013dfe3802b22.tar.bz2
added test for evaluation of an expression in a variable; evals once
by compiling, second time using the previous compilation
-rw-r--r--tests/execute.test8
1 files changed, 7 insertions, 1 deletions
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 ""}