use rswind_extractor::html::HtmlExtractor; fn run(input: &str) -> Vec<&str> { HtmlExtractor::new(input).collect() } #[test] fn test_normal_tag() { let input = r#""#; let actual = run(input); assert_eq!(actual.len(), 0); } #[test] fn test_normal_tag_class() { let input = r#""#; let actual = run(input); assert_eq!(actual, ["flex"]); } #[test] fn test_normal_tag_multi_class() { let input = r#""#; let actual = run(input); assert_eq!(actual, ["flex", "f"]); } #[test] fn test_fragment_tag() { let input = r#"<>>"#; let actual = run(input); assert_eq!(actual.len(), 0); } #[test] fn test_fragment_tag_combine() { let input = r#"<>
>"#; let actual = run(input); assert_eq!(actual, ["f"]); } #[test] fn test_self_close_tag() { let input = r#""#; let actual = run(input); assert_eq!(actual.len(), 0); } #[test] fn test_script_tag() { let input = r#""#; let actual = run(input); assert_eq!(actual, ["hello"]); } #[test] fn test_script_tag_with_normal() { let input = r#"