#[cfg(test)] mod tests { use web_macro::*; #[test] fn test_function() { assert_eq!("

test

", heading1!(String::from("test"))); } #[test] fn test_literal() { assert_eq!("

test

", heading1!("test")); } #[test] fn test_recursive() { assert_eq!("

test

", heading1!(heading1!("test"))); } #[test] fn test_options_literal() { assert_eq!( "

test

", heading1!("test", id = "oui", class = "test") ); } #[test] fn test_options_functional() { assert_eq!( "

test

", heading1!( "test", id = String::from("oui"), class = String::from("test"), pseudo = { let mut s = String::new(); s.push_str("adolf"); s } ) ); } #[test] fn test_level() { assert_eq!("

test

", heading2!("test")) } #[test] fn test_level_options() { assert_eq!("

test

", heading3!("test", id = "oui")) } }