aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-07-09 13:08:30 +1000
committerSteve Bennett <steveb@workware.net.au>2011-07-18 11:33:44 +1000
commit9c0d53835cae3b23e55ac008ce0bad626af3145a (patch)
tree0534700f10d78b43af691194e2fde059cf2e8339 /tests
parente46851db8294d66e97e0a98a689f0a562deded4e (diff)
downloadjimtcl-9c0d53835cae3b23e55ac008ce0bad626af3145a.zip
jimtcl-9c0d53835cae3b23e55ac008ce0bad626af3145a.tar.gz
jimtcl-9c0d53835cae3b23e55ac008ce0bad626af3145a.tar.bz2
Don't add a local proc context in source and eval
Only procedures add a local proc context. Otherwise it is not possible to use local/upcall in Tcl packages. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/alias.test12
1 files changed, 2 insertions, 10 deletions
diff --git a/tests/alias.test b/tests/alias.test
index abbc2a0..00d3327 100644
--- a/tests/alias.test
+++ b/tests/alias.test
@@ -53,15 +53,6 @@ test curry-1.5 "Delete curry" {
collect
} {2}
-test local-1.1 "local lambda in eval" {
- set x 1
- eval {
- local set a [lambda {b} { incr b }]
- set x [$a $x]
- }
- list [info procs $a] $x
-} {{} 2}
-
test local-1.2 "local curry in proc" {
proc a {} {
local set p [curry info exists]
@@ -116,13 +107,14 @@ test local-1.8 "local on non-proc" {
} {1 {not a proc: "blah"}}
test local-1.9 "local on existing proc" {
- eval {
+ proc x {} {
proc a {b} {incr b}
local function a
set c [lambda b {incr b -1}]
local function $c
lappend result [a 1] [$c 2]
}
+ set result [x]
list [info procs a] $result
} {{} {2 1}}