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/xml.typ | |
| parent | 72dd79210602ecc799726fc096b078afbb47f299 (diff) | |
Better test runner (#3922)
Diffstat (limited to 'tests/suite/loading/xml.typ')
| -rw-r--r-- | tests/suite/loading/xml.typ | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/suite/loading/xml.typ b/tests/suite/loading/xml.typ new file mode 100644 index 00000000..41cd20e7 --- /dev/null +++ b/tests/suite/loading/xml.typ @@ -0,0 +1,28 @@ +--- xml --- +// Test reading XML data. +#let data = xml("/assets/data/hello.xml") +#test(data, (( + tag: "data", + attrs: (:), + children: ( + "\n ", + (tag: "hello", attrs: (name: "hi"), children: ("1",)), + "\n ", + ( + tag: "data", + attrs: (:), + children: ( + "\n ", + (tag: "hello", attrs: (:), children: ("World",)), + "\n ", + (tag: "hello", attrs: (:), children: ("World",)), + "\n ", + ), + ), + "\n", + ), +),)) + +--- xml-invalid --- +// Error: 6-28 failed to parse XML (found closing tag 'data' instead of 'hello' in line 3) +#xml("/assets/data/bad.xml") |
