aboutsummaryrefslogtreecommitdiff
path: root/test/for.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-21 18:01:19 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-21 18:01:19 -0400
commit68bedd3c23757a8576e77f38e38ddcf9ecd26d19 (patch)
tree86ce1610143efc43453f50d3413925797601c48a /test/for.tm
parent0815de981c683cac7dbac082ee14c11894089f31 (diff)
Use colons instead of '=' for tables (e.g. {1: 2})
Diffstat (limited to 'test/for.tm')
-rw-r--r--test/for.tm6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/for.tm b/test/for.tm
index 3598df85..906a4df9 100644
--- a/test/for.tm
+++ b/test/for.tm
@@ -15,14 +15,14 @@ func labeled_nums(nums:[Int] -> Text)
return "EMPTY"
return result
-func table_str(t:{Text=Text} -> Text)
+func table_str(t:{Text:Text} -> Text)
str := ""
for k,v in t
str ++= "$k:$v,"
else return "EMPTY"
return str
-func table_key_str(t:{Text=Text} -> Text)
+func table_key_str(t:{Text:Text} -> Text)
str := ""
for k in t
str ++= "$k,"
@@ -36,7 +36,7 @@ func main()
assert labeled_nums([10,20,30]) == "1:10,2:20,3:30,"
assert labeled_nums([]) == "EMPTY"
- >> t := {"key1"="value1", "key2"="value2"}
+ >> t := {"key1": "value1", "key2": "value2"}
assert table_str(t) == "key1:value1,key2:value2,"
assert table_str({}) == "EMPTY"