diff options
| author | Beiri22 <beier1@hs-mittweida.de> | 2023-08-25 14:31:03 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-25 14:31:03 +0200 |
| commit | 22b5959608704ddd5f081b710944390773002158 (patch) | |
| tree | dbdb5d09e83203cb3c51cba08319603f25bcaa85 /tests | |
| parent | ea469c2df6378e8ce860217cd100831ae6ee8d9f (diff) | |
separate decode from string/bytes for all data functions; and encode for json, toml, yaml via serde (#1935)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/compute/data.typ | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/typ/compute/data.typ b/tests/typ/compute/data.typ index 7b3fc576..d913d26e 100644 --- a/tests/typ/compute/data.typ +++ b/tests/typ/compute/data.typ @@ -60,6 +60,24 @@ minute: 38, second: 57, )) +#test(data.date_time2, datetime( + year: 2023, + month: 2, + day: 1, + hour: 15, + minute: 38, + second: 57, +)) +#test(data.date, datetime( + year: 2023, + month: 2, + day: 1, +)) +#test(data.time, datetime( + hour: 15, + minute: 38, + second: 57, +)) --- // Error: 7-24 failed to parse toml file: expected `.`, `=`, index 15-16 @@ -68,7 +86,7 @@ --- // Test reading YAML data #let data = yaml("/files/yaml-types.yaml") -#test(data.len(), 7) +#test(data.len(), 8) #test(data.null_key, (none, none)) #test(data.string, "text") #test(data.integer, 5) @@ -76,7 +94,7 @@ #test(data.mapping, ("1": "one", "2": "two")) #test(data.seq, (1,2,3,4)) #test(data.bool, false) -#test(data.keys().contains("true"), false) +#test(data.keys().contains("true"), true) --- --- |
