use pretty_assertions::assert_eq; use tide::StatusCode; use tide_jsx::{html, rsx, view, component, Render, raw}; use tide_jsx::html::HTML5Doctype; use std::borrow::Cow; #[test] fn ui() { let t = trybuild::TestCases::new(); t.compile_fail("tests/ui/fail/*.rs"); } #[test] fn works_with_dashes() { use pretty_assertions::assert_eq; let value = html! {
}; assert_eq!(value, r#"
"#); } #[test] fn works_with_raw() { let actual = html! {
{raw!("")}
}; assert_eq!(actual, "
"); } #[test] fn works_with_raw_ident() { let actual = html! { }; assert_eq!(actual, r#""#); } #[test] fn works_with_keywords() { assert_eq!(html! { }, r#""#); assert_eq!(html! {