hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit 3c0434105ff2ad5a9f37d02954c9a262a0ad0ae7
parent fd6d076e7d99ca7f404449c2cee7d54abed91af4
Author: Drew DeVault <sir@cmpwn.com>
Date:   Sat, 10 Apr 2021 11:24:46 -0400

format::xml: add cdata test

Diffstat:
Mformat/xml/+test.ha | 13+++++++++++++
1 file changed, 13 insertions(+), 0 deletions(-)

diff --git a/format/xml/+test.ha b/format/xml/+test.ha @@ -53,6 +53,19 @@ use fmt; ]); }; +@test fn cdata() void = { + xmltest("<?xml version='1.0' encoding='utf-8' ?> +<root> + <![CDATA[Hello world &foo <bar>]]> +</root>", [ + "root": elementstart, + "\n\t": text, + "Hello world &foo <bar>": text, + "\n": text, + elementend, + ]); +}; + fn xmltest(input: str, expected: []token) void = { let in = bufio::fixed(strings::toutf8(input), io::mode::READ); defer io::close(in);