diff options
author | Miguel Sofer <miguel.sofer@gmail.com> | 2001-09-10 17:04:10 (GMT) |
---|---|---|
committer | Miguel Sofer <miguel.sofer@gmail.com> | 2001-09-10 17:04:10 (GMT) |
commit | 06e3a349025007800b4377a5924df0a93677dd8e (patch) | |
tree | 52884050022ae75515a2a4bdea09838b47b0e70c /tests/proc.test | |
parent | bcc1ef87efd2eab7f065b4e357b890ac9efcea79 (diff) | |
download | tcl-06e3a349025007800b4377a5924df0a93677dd8e.zip tcl-06e3a349025007800b4377a5924df0a93677dd8e.tar.gz tcl-06e3a349025007800b4377a5924df0a93677dd8e.tar.bz2 |
Bytecompiling noops [FQ #451441]
Diffstat (limited to 'tests/proc.test')
-rw-r--r-- | tests/proc.test | 19 |
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 ""} |