aboutsummaryrefslogtreecommitdiff
path: root/tests/alias.test
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2020-05-31 17:31:55 +1000
committerSteve Bennett <steveb@workware.net.au>2020-06-05 21:13:11 +1000
commitd4cd7cabc6359bf5e1af8ce0219e621ae0ec3d86 (patch)
tree98d160b6903044aaf50d7595b078b1d8ab3276bd /tests/alias.test
parentfdefefa4e655be612df2ac036d57223b8c9cbc0a (diff)
downloadjimtcl-d4cd7cabc6359bf5e1af8ce0219e621ae0ec3d86.zip
jimtcl-d4cd7cabc6359bf5e1af8ce0219e621ae0ec3d86.tar.gz
jimtcl-d4cd7cabc6359bf5e1af8ce0219e621ae0ec3d86.tar.bz2
core: variable names may now contain embedded nulls
Hash tables used to store variables are now use Jim_Obj keys rather than allocated char *, so embedded nulls are supported. This is generally a performance win as the existing Jim_Obj can be used as the key. Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'tests/alias.test')
-rw-r--r--tests/alias.test10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/alias.test b/tests/alias.test
index 866aa1b..64855dd 100644
--- a/tests/alias.test
+++ b/tests/alias.test
@@ -145,12 +145,12 @@ test statics-1.1 "missing static variable init" {
}
} 1
-test statics-1.2 "static variable with invalid name" {
- catch {
- proc a {b} "{c\0d 4}" {
- }
+test statics-1.2 "static variable with name containing null" {
+ proc a {b} "{c\0d 4}" {
+ return [set c\0d]
}
-} 1
+ a 5
+} 4
test statics-1.3 "duplicate static variable" {
catch {