Artifact 4300f884824824411b600a726172ff7213d3a0a1c6a1b626694df168c2f4ff12:
- File src/tests.rs — part of check-in [c996f5c871] at 2026-01-12 13:41:17 on branch trunk — minor typos, add back tests, change formatting a lot (user: arcade, size: 478) [annotate] [blame] [check-ins using]
use crate::utils::validate; use stacked_errors::{ Result, StackableErr, }; #[test] fn check_valid () -> Result<()> { let html = "<p>Some <b>valid</b> HTML</p>"; let res = validate(html).stack()?; assert_eq!(res, html); Ok(()) } #[test] #[should_panic = "Found special tag while closing generic tag"] fn check_invalid () -> () { let html = "<p>Some <b>valid</b> HTML</p></code><a href='http://somewere.com'>Link injection!</a>"; let _ = validate(html).unwrap(); () }