use crate::assert_html_eq; #[test] fn without_value() { assert_html_eq!({ a foo {} } => ""); assert_html_eq!({ a foo bar {} } => ""); } #[test] fn with_value() { assert_html_eq!({ a foo="bar" {} } => ""); assert_html_eq!({ a foo=3 bar=3.5 baz=true bat='a' car=b'a' cat=b"Hello \xF0\x90\x80World" {} } => ""); } #[test] fn mix_of_two_types_of_attrs() { assert_html_eq!({ a foo="bar" baz {} } => ""); assert_html_eq!({ a foo bar="baz" {} } => ""); } #[test] fn self_closing_tags() { assert_html_eq!({ a foo; } => ""); assert_html_eq!({ a foo; b {} } => ""); assert_html_eq!({ a foo="bar"; b {} } => ""); } #[test] fn attr_names_with_hyphens() { assert_html_eq!({ a foo-bar; } => ""); assert_html_eq!({ a-b foo-bar="baz"; } => ""); }