use bytes::BytesMut; use rstml_component::{write_html, For, HtmlFormatter}; macro_rules! assert_html_eq { ($expected:expr, $($rest:tt)*) => { let mut buffer = BytesMut::new(); let mut formatter = HtmlFormatter::new(&mut buffer); write_html!(formatter, $($rest)*).expect("failed to write html"); let raw = buffer.as_ref(); let as_str = std::str::from_utf8(raw).expect("invalid utf-8"); assert_eq!(as_str, $expected); }; } #[test] fn for_iter() { let items = vec!["a", "b", "c"]; assert_html_eq!( "", ); }