diff options
author | dgp <dgp@users.sourceforge.net> | 2016-04-07 14:56:25 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-04-07 14:56:25 (GMT) |
commit | 9131cfcbbb43afe4706082a365c706dd0375d259 (patch) | |
tree | b31bfd9e3cb74aa211151d59e947672df452ab06 /tests/uplevel.test | |
parent | 7032562591b12990b1b45ad8815bb30513a4d8e1 (diff) | |
parent | b6e7e4e4283f3809245d72b487eb5cc65cc6e95b (diff) | |
download | tcl-9131cfcbbb43afe4706082a365c706dd0375d259.zip tcl-9131cfcbbb43afe4706082a365c706dd0375d259.tar.gz tcl-9131cfcbbb43afe4706082a365c706dd0375d259.tar.bz2 |
merge 8.6
Diffstat (limited to 'tests/uplevel.test')
-rw-r--r-- | tests/uplevel.test | 99 |
1 files changed, 99 insertions, 0 deletions
diff --git a/tests/uplevel.test b/tests/uplevel.test index 3f6b2a8..737c571 100644 --- a/tests/uplevel.test +++ b/tests/uplevel.test @@ -101,6 +101,105 @@ test uplevel-4.4 {error: not enough args} -returnCodes error -body { uplevel 1 }} } -result {wrong # args: should be "uplevel ?level? command ?arg ...?"} +test uplevel-4.5 {level parsing} { + apply {{} {uplevel 0 {}}} +} {} +test uplevel-4.6 {level parsing} { + apply {{} {uplevel #0 {}}} +} {} +test uplevel-4.7 {level parsing} { + apply {{} {uplevel [expr 0] {}}} +} {} +test uplevel-4.8 {level parsing} { + apply {{} {uplevel #[expr 0] {}}} +} {} +test uplevel-4.9 {level parsing} { + apply {{} {uplevel -0 {}}} +} {} +test uplevel-4.10 {level parsing} { + apply {{} {uplevel #-0 {}}} +} {} +test uplevel-4.11 {level parsing} { + apply {{} {uplevel [expr -0] {}}} +} {} +test uplevel-4.12 {level parsing} { + apply {{} {uplevel #[expr -0] {}}} +} {} +test uplevel-4.13 {level parsing} { + apply {{} {uplevel 1 {}}} +} {} +test uplevel-4.14 {level parsing} { + apply {{} {uplevel #1 {}}} +} {} +test uplevel-4.15 {level parsing} { + apply {{} {uplevel [expr 1] {}}} +} {} +test uplevel-4.16 {level parsing} { + apply {{} {uplevel #[expr 1] {}}} +} {} +test uplevel-4.17 {level parsing} { + apply {{} {uplevel -0xffffffff {}}} +} {} +test uplevel-4.18 {level parsing} { + apply {{} {uplevel #-0xffffffff {}}} +} {} +test uplevel-4.19 {level parsing} { + apply {{} {uplevel [expr -0xffffffff] {}}} +} {} +test uplevel-4.20 {level parsing} { + apply {{} {uplevel #[expr -0xffffffff] {}}} +} {} +test uplevel-4.21 {level parsing} -body { + apply {{} {uplevel -1 {}}} +} -returnCodes error -result {invalid command name "-1"} +test uplevel-4.22 {level parsing} -body { + apply {{} {uplevel #-1 {}}} +} -returnCodes error -result {bad level "#-1"} +test uplevel-4.23 {level parsing} -body { + apply {{} {uplevel [expr -1] {}}} +} -returnCodes error -result {invalid command name "-1"} +test uplevel-4.24 {level parsing} -body { + apply {{} {uplevel #[expr -1] {}}} +} -returnCodes error -result {bad level "#-1"} +test uplevel-4.25 {level parsing} -body { + apply {{} {uplevel 0xffffffff {}}} +} -returnCodes error -result {bad level "0xffffffff"} +test uplevel-4.26 {level parsing} -body { + apply {{} {uplevel #0xffffffff {}}} +} -returnCodes error -result {bad level "#0xffffffff"} +test uplevel-4.27 {level parsing} -body { + apply {{} {uplevel [expr 0xffffffff] {}}} +} -returnCodes error -result {bad level "4294967295"} +test uplevel-4.28 {level parsing} -body { + apply {{} {uplevel #[expr 0xffffffff] {}}} +} -returnCodes error -result {bad level "#4294967295"} +test uplevel-4.29 {level parsing} -body { + apply {{} {uplevel 0.2 {}}} +} -returnCodes error -result {bad level "0.2"} +test uplevel-4.30 {level parsing} -body { + apply {{} {uplevel #0.2 {}}} +} -returnCodes error -result {bad level "#0.2"} +test uplevel-4.31 {level parsing} -body { + apply {{} {uplevel [expr 0.2] {}}} +} -returnCodes error -result {bad level "0.2"} +test uplevel-4.32 {level parsing} -body { + apply {{} {uplevel #[expr 0.2] {}}} +} -returnCodes error -result {bad level "#0.2"} +test uplevel-4.33 {level parsing} -body { + apply {{} {uplevel .2 {}}} +} -returnCodes error -result {invalid command name ".2"} +test uplevel-4.34 {level parsing} -body { + apply {{} {uplevel #.2 {}}} +} -returnCodes error -result {bad level "#.2"} +test uplevel-4.35 {level parsing} -body { + apply {{} {uplevel [expr .2] {}}} +} -returnCodes error -result {bad level "0.2"} +test uplevel-4.36 {level parsing} -body { + apply {{} {uplevel #[expr .2] {}}} +} -returnCodes error -result {bad level "#0.2"} + + + proc a2 {} { uplevel a3 |