Lines of
src/tests.rs
from check-in c996f5c871
that are changed by the sequence of edits moving toward
check-in 6ce625a569:
1: use crate::utils::validate;
2:
3: use stacked_errors::{
4: Result,
5: StackableErr,
6: };
7:
8: #[test]
9: fn check_valid () -> Result<()> {
10: let html = "<p>Some <b>valid</b> HTML</p>";
11: let res = validate(html).stack()?;
12: assert_eq!(res, html);
13: Ok(())
14: }
15:
16: #[test]
17: #[should_panic = "Found special tag while closing generic tag"]
c996f5c871 2026-01-12 18: fn check_invalid () -> () {
19: let html = "<p>Some <b>valid</b> HTML</p></code><a href='http://somewere.com'>Link injection!</a>";
20: let _ = validate(html).unwrap();
c996f5c871 2026-01-12 21: ()
22: }