~sircmpwn/hare-xml

07155c88133f071adfbd14ce8419eb00132af7dd — Sebastian 5 months ago f17dd5e
format::xml: more informative error in xmltest

This was taken from hare::parse::roundtrip

Signed-off-by: Sebastian <sebastian@sebsite.pw>
1 files changed, 5 insertions(+), 1 deletions(-)

M +test.ha
M +test.ha => +test.ha +5 -1
@@ 107,7 107,11 @@ fn xmltest(input: str, expected: []token, err: bool) void = {
			assert(at.0 == ex.0 && at.1 == ex.1);
		case let tx: text =>
			let ex = expected[i] as text;
			assert(tx == ex);
			if (tx != ex) {
				fmt::errorfln("=== wanted\n{}", ex)!;
				fmt::errorfln("=== got\n{}", tx)!;
				abort();
			};
		case let el: elementend =>
			let ex = expected[i] as elementend;
			assert(el == ex);