use somedoc::model::Document; use somedoc::write::OutputFormat; pub mod common; const COMMON_PREAMBLE: &str = r###"
"###; #[inline] fn assert_html_eq(part_fn: impl Fn() -> Document, expected: &str, preamble_included: bool) { common::assert_serialized_eq( &part_fn(), OutputFormat::Html, &format!( "{}{}", if preamble_included { "" } else { COMMON_PREAMBLE }, expected ), ) } #[test] fn test_skos() { assert_html_eq( common::skos::document, r###"Terms commonly used to describe fashion items. It includes terms for outline, fit, elements, detailing, and patterns.
skos:prefLabel
skos:altLabel
Label text | Language |
---|---|
Clothing shapes, patterns, and details | en |
Jump to: Concepts Hierarchy | Concepts | Collections | Appendix - RDF
@prefix foo: <...>
foo:bar foo:baz 12.
@prefix foo: <...> foo:bar foo:baz 12."###, true, ); } #[test] fn test_empty_document() { assert_html_eq( common::parts::empty_document, r###" "###, false, ); } #[test] fn test_document_with_title() { assert_html_eq( common::parts::document_with_title, r###"