aboutsummaryrefslogtreecommitdiff
path: root/test/tables.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-25 14:41:28 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-25 14:41:28 -0500
commit18db0fcee83f448258c17c7ac6ab80c623685666 (patch)
tree171e7c258bf4eb56b4adb2a0d5f860ca1b0ebf13 /test/tables.tm
parent4fc026a7270501d3c13ac267f6408b69c03d789c (diff)
Add test for table iteration
Diffstat (limited to 'test/tables.tm')
-rw-r--r--test/tables.tm12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/tables.tm b/test/tables.tm
index 2e7c4798..891e0614 100644
--- a/test/tables.tm
+++ b/test/tables.tm
@@ -9,6 +9,12 @@
>> t["???"]
= 999
+t_str := ""
+for k,v in t
+ t_str ++= "({k}=>{v})"
+>> t_str
+= "(one=>1)(two=>2)"
+
>> #t
= 2
>> t.default
@@ -37,3 +43,9 @@
= !Int64
>> t2.fallback
= ?(readonly){"one"=>1, "two"=>2; default=999}
+
+t2_str := ""
+for k,v in t2
+ t2_str ++= "({k}=>{v})"
+>> t2_str
+= "(three=>3)"