diff options
| author | Laurenz <laurmaedje@gmail.com> | 2024-04-13 10:39:45 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-13 08:39:45 +0000 |
| commit | 020294fca9a7065d4b9cf4e677f606ebaaa29b00 (patch) | |
| tree | c0027ad22046e2726c22298461327823d6b88d53 /tests/suite/loading/json.typ | |
| parent | 72dd79210602ecc799726fc096b078afbb47f299 (diff) | |
Better test runner (#3922)
Diffstat (limited to 'tests/suite/loading/json.typ')
| -rw-r--r-- | tests/suite/loading/json.typ | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/suite/loading/json.typ b/tests/suite/loading/json.typ new file mode 100644 index 00000000..3ebeaf2f --- /dev/null +++ b/tests/suite/loading/json.typ @@ -0,0 +1,16 @@ +--- json --- +// Test reading JSON data. +#let data = json("/assets/data/zoo.json") +#test(data.len(), 3) +#test(data.at(0).name, "Debby") +#test(data.at(2).weight, 150) + +--- json-invalid --- +// Error: 7-30 failed to parse JSON (expected value at line 3 column 14) +#json("/assets/data/bad.json") + +--- issue-3363-json-large-number --- +// Big numbers (larger than what i64 can store) should just lose some precision +// but not overflow +#let bignum = json("/assets/data/big-number.json") +#bignum |
