aboutsummaryrefslogtreecommitdiff
path: root/test/tables.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-25 14:38:04 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-25 14:38:04 -0500
commit4fc026a7270501d3c13ac267f6408b69c03d789c (patch)
treea2631650b810dec43bf9272bee5cc684acd2a3a5 /test/tables.tm
parentd06c63c70c67af6db46cd2a1e3ed002e4b280a8b (diff)
Add tests for '#' on collections
Diffstat (limited to 'test/tables.tm')
-rw-r--r--test/tables.tm8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/tables.tm b/test/tables.tm
index 5b53fc80..2e7c4798 100644
--- a/test/tables.tm
+++ b/test/tables.tm
@@ -1,12 +1,16 @@
>> t := {"one"=>1, "two"=>2; default=999}
= {"one"=>1, "two"=>2; default=999}
+
>> t["one"]
= 1
>> t["two"]
= 2
>> t["???"]
= 999
+
+>> #t
+= 2
>> t.default
= ?(readonly)999
>> t.fallback
@@ -19,12 +23,16 @@
>> t2 := {"three"=>3; fallback=t}
= {"three"=>3; fallback={"one"=>1, "two"=>2; default=999}}
+
>> t2["one"]
= 1
>> t2["three"]
= 3
>> t2["???"]
= 999
+
+>> #t2
+= 1
>> t2.default
= !Int64
>> t2.fallback