XmlXomApprovals
Xom has support for emojies, so it can be a confinient way to use for xml that contains emojies.
var expected = """
<?xml version="1.0" encoding="UTF-8"?>
<a>
<b>😸 & 🐶</b>
</a>
""";
String minimizedXml = expected.replaceAll("\n", " ").replace(" ", "");
XmlXomApprovals.verifyXml(minimizedXml, new Options().inline(expected));
We also allow you to create your own pretty printer when using Approvals.verify
.
Or no pretty printing at all, then use
Approvals.verifyXml(xml, x -> x);