Annotation For src/tests.rs
Logged in as anonymous

Origin for each line in src/tests.rs from check-in c996f5c871:

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