diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/compute/data.typ | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/typ/compute/data.typ b/tests/typ/compute/data.typ index cfd761df..8b50f7c4 100644 --- a/tests/typ/compute/data.typ +++ b/tests/typ/compute/data.typ @@ -42,6 +42,23 @@ #json("/bad.json") --- +// Test reading TOML data. +#let data = toml("/toml_types.toml") +#test(data.string, "wonderful") +#test(data.integer, 42) +#test(data.float, 3.14) +#test(data.boolean, true) +#test(data.date_time, "2023-02-01T15:38:57Z") +#test(data.array, (1, "string", 3.0, false)) +#test(data.inline_table, ("first": "amazing", "second": "greater") ) +#test(data.table.element, 5) +#test(data.table.others, (false, "indeed", 7)) + +--- +// Error: 7-18 failed to parse toml file: expected `.`, `=`, index 15-15 +#toml("/bad.toml") + +--- // Test reading YAML data #let data = yaml("/yamltypes.yaml") #test(data.len(), 7) |
