diff options
author | Steve Bennett <steveb@workware.net.au> | 2011-05-23 23:10:23 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2011-05-24 12:08:03 +1000 |
commit | 041a334f525021c6e7015d537a56d44352d95b10 (patch) | |
tree | 5a60366036a3c029b756441059ca3059eccd3cbc /tests/alias.test | |
parent | 2dd84967ea821e7bf650b8efcb8297122b83ad9b (diff) | |
download | jimtcl-041a334f525021c6e7015d537a56d44352d95b10.zip jimtcl-041a334f525021c6e7015d537a56d44352d95b10.tar.gz jimtcl-041a334f525021c6e7015d537a56d44352d95b10.tar.bz2 |
Small code cleanups
Remove Jim_SetWide() since it is only used by incr
More tests for better test coverage
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/alias.test')
-rw-r--r-- | tests/alias.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/alias.test b/tests/alias.test index 7f0d721..4fd392d 100644 --- a/tests/alias.test +++ b/tests/alias.test @@ -126,4 +126,34 @@ test local-1.9 "local on existing proc" { list [info procs a] $result } {{} {2 1}} +test statics-1.1 "missing static variable init" { + unset -nocomplain c + catch { + proc a {b} {c} { + # No initialiser for c + } + } +} 1 + +test statics-1.2 "static variable with invalid name" { + catch { + proc a {b} "{c\0d 4}" { + } + } +} 1 + +test statics-1.3 "duplicate static variable" { + catch { + proc a {b} {{c 1} {c 2}} { + } + } +} 1 + +test statics-1.4 "bad static variable init" { + catch { + proc a {b} {{c 1 2}} { + } + } +} 1 + testreport |