diff options
author | dgp <dgp@users.sourceforge.net> | 2019-12-30 21:25:43 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2019-12-30 21:25:43 (GMT) |
commit | 341619118a2ea2f6da6062f2069842d22d2bbb8f (patch) | |
tree | c3254e9ffb9adf777a3a13d28c6f4e556593ee6f /tests/upvar.test | |
parent | 7278c6fb2c9bd8691b60e61ac24a57a85d10c1ae (diff) | |
parent | 30d15963daa3545b3a2b09e6cd1f340f68723020 (diff) | |
download | tcl-341619118a2ea2f6da6062f2069842d22d2bbb8f.zip tcl-341619118a2ea2f6da6062f2069842d22d2bbb8f.tar.gz tcl-341619118a2ea2f6da6062f2069842d22d2bbb8f.tar.bz2 |
merge 8.7
Diffstat (limited to 'tests/upvar.test')
-rw-r--r-- | tests/upvar.test | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/upvar.test b/tests/upvar.test index 91153a6..a483569 100644 --- a/tests/upvar.test +++ b/tests/upvar.test @@ -304,6 +304,17 @@ test upvar-8.3 {errors in upvar command} -returnCodes error -body { proc p1 {} {upvar a b c} p1 } -result {bad level "a"} +test upvar-8.3.1 {bad level for upvar (upvar at top-level, bug [775ee88560])} -body { + proc p1 {} { uplevel { upvar b b; lappend b UNEXPECTED } } + uplevel #0 { p1 } +} -returnCodes error -result {bad level "1"} +test upvar-8.3.2 {bad level for upvar (upvar at top-level, bug [775ee88560])} -setup { + interp create i +} -body { + i eval { upvar b b; lappend b UNEXPECTED } +} -returnCodes error -result {bad level "1"} -cleanup { + interp delete i +} test upvar-8.4 {errors in upvar command} -returnCodes error -body { proc p1 {} {upvar 0 b b} p1 @@ -355,7 +366,7 @@ test upvar-8.11 {upvar will not create a variable that looks like an array} -set test upvar-9.1 {Tcl_UpVar2 procedure} testupvar { list [catch {testupvar xyz a {} x global} msg] $msg -} {1 {bad level "xyz"}} +} {1 {bad level "1"}} test upvar-9.1.1 {TclGetFrame, via Tcl_UpVar2} testupvar { apply {{} {testupvar xyz a {} x local; set x foo}} set a |