summaryrefslogtreecommitdiffstats
path: root/tests/info.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/info.test')
-rw-r--r--tests/info.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/info.test b/tests/info.test
index 784dad1..38cb8ee 100644
--- a/tests/info.test
+++ b/tests/info.test
@@ -449,6 +449,13 @@ test info-12.6 {info locals vs unset compiled locals} {
}
lsort [t1 {a b c c d e f}]
} {a b c d e f}
+test info-12.7 {info locals with temporary variables} {
+ proc t1 {} {
+ foreach a {b c} {}
+ info locals
+ }
+ t1
+} {a}
test info-13.1 {info nameofexecutable option} {
list [catch {info nameofexecutable foo} msg] $msg
@@ -558,6 +565,13 @@ test info-19.3 {info vars option} {
test info-19.4 {info vars option} {
list [catch {info vars a b} msg] $msg
} {1 {wrong # args: should be "info vars ?pattern?"}}
+test info-19.5 {info vars with temporary variables} {
+ proc t1 {} {
+ foreach a {b c} {}
+ info vars
+ }
+ t1
+} {a}
test info-20.1 {miscellaneous error conditions} {
list [catch {info} msg] $msg