use std::sync::Arc; use sidoc::{Builder, RenderContext}; use sidoc_html5::Element; #[test] fn data_attr() { let mut bldr = Builder::new(); let e = Element::new("br").data_attr("hello", "world"); e.add_empty(&mut bldr); let mut r = RenderContext::new(); let doc = bldr.build().unwrap(); r.doc("root", Arc::new(doc)); let buf = r.render("root").unwrap(); assert_eq!(buf, "
\n"); } // vim: set ft=rust et sw=2 ts=2 sts=2 cinoptions=2 tw=79 :