aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2023-07-08 12:07:13 +1000
committerSteve Bennett <steveb@workware.net.au>2023-08-13 12:40:27 +1000
commit3c9587340bcd62eef8e246fcd1c0a2469943898f (patch)
treedaaad4c5b9e69404aa4732d0ea66b454e8d4bea0
parent28570844204707fc01a735104fc89284d9eae766 (diff)
downloadjimtcl-3c9587340bcd62eef8e246fcd1c0a2469943898f.zip
jimtcl-3c9587340bcd62eef8e246fcd1c0a2469943898f.tar.gz
jimtcl-3c9587340bcd62eef8e246fcd1c0a2469943898f.tar.bz2
tests: misc: improve 'info statics' test
To show that it returns the current values, not just the original values Signed-off-by: Steve Bennett <steveb@workware.net.au>
-rw-r--r--tests/misc.test8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/misc.test b/tests/misc.test
index cffb0a6..ac6fb75 100644
--- a/tests/misc.test
+++ b/tests/misc.test
@@ -579,8 +579,10 @@ test eval-list-1.1 {Lost string rep with list} {
test info-statics-1.1 {info statics commands} {
set x 1
- proc a {} {x {y 2}} {}
- lsort [info statics a]
-} {1 2 x y}
+ proc a {} {x {y 2}} { incr x; incr y}
+ a
+ # Returns the dict of the current static variables
+ info statics a
+} {x 2 y 3}
testreport