@testable import PureXML import Testing /// HTML5 depth conformance, driven through the validation framework (#119, the /// zone that produced #109): the spec-fidelity cases go through the document /// parser; the lenient-model cases through the fragment parser. @Suite("Conformance corpus: HTML depth") struct ConformanceHTMLDepthTests { /// The serialized body content of a full document parse. private func documentBody(_ html: String) -> String { let full = PureXML.HTML.serialize(PureXML.HTML.parseDocument(html)) let wrapper = "
" guard full.hasPrefix(wrapper), full.hasSuffix("") else { return full } return String(full.dropFirst(wrapper.count).dropLast("