Lines of
src/tests.rs
from check-in 6ce625a569
that are changed by the sequence of edits moving toward
check-in dafeec0481:
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]
6ce625a569 2026-01-12 17: #[should_panic = "Found special tag while closing generic tag"]
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();
21: }