summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authormsofer <msofer@noemail.net>2001-02-23 21:41:01 (GMT)
committermsofer <msofer@noemail.net>2001-02-23 21:41:01 (GMT)
commit2d12de2ce0e286d7923a4689fac5904ba281813d (patch)
tree8393b97a50532bf1d88384a209ae4ec2af706f6c /tests
parent3996606cc56bf71c6565fc42223f202a9199bb88 (diff)
downloadtcl-2d12de2ce0e286d7923a4689fac5904ba281813d.zip
tcl-2d12de2ce0e286d7923a4689fac5904ba281813d.tar.gz
tcl-2d12de2ce0e286d7923a4689fac5904ba281813d.tar.bz2
added test for evaluation of an expression in a variable; evals once
by compiling, second time using the previous compilation FossilOrigin-Name: 31a8c28c54ce65df0a8bd66227557007f3394055
Diffstat (limited to 'tests')
-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 ""}