summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2001-09-10 17:04:10 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2001-09-10 17:04:10 (GMT)
commit06e3a349025007800b4377a5924df0a93677dd8e (patch)
tree52884050022ae75515a2a4bdea09838b47b0e70c /tests
parentbcc1ef87efd2eab7f065b4e357b890ac9efcea79 (diff)
downloadtcl-06e3a349025007800b4377a5924df0a93677dd8e.zip
tcl-06e3a349025007800b4377a5924df0a93677dd8e.tar.gz
tcl-06e3a349025007800b4377a5924df0a93677dd8e.tar.bz2
Bytecompiling noops [FQ #451441]
Diffstat (limited to 'tests')
-rw-r--r--tests/proc.test19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/proc.test b/tests/proc.test
index 8f21817..a982d78 100644
--- a/tests/proc.test
+++ b/tests/proc.test
@@ -13,7 +13,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: proc.test,v 1.9 2001/09/04 22:45:52 msofer Exp $
+# RCS: @(#) $Id: proc.test,v 1.10 2001/09/10 17:04:10 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
@@ -299,6 +299,23 @@ test proc-4.7 {TclCreateProc, procbody obj, inconsitent arg default value} {
set result
} {procedure "t": formal parameter "z" has default value inconsistent with precompiled body}
+test proc-5.1 {Bytecompiling noop; test for correct argument substitution} {
+ proc p args {} ; # this will be bytecompiled into t
+ proc t {} {
+ set res {}
+ set a 0
+ set b 0
+ trace add variable a read {append res a ;#}
+ trace add variable b write {append res b ;#}
+ p $a ccccccw {bfe} {$a} [incr b] [incr a] {[incr b]} {$a} hello
+ set res
+ }
+ set result [t]
+ catch {rename p ""}
+ catch {rename t ""}
+ set result
+} {aba}
+
# cleanup
catch {rename p ""}
catch {rename t ""}