mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Match the SVG parser refusal directly in the guard test
This commit is contained in:
1 parent
62d928f97d
commit
ba146351ed
1 file changed
+3
-1
@@ -49,7 +49,9 @@ fn original_xml_guards_run_before_repair_or_conversion() {
|
||||
write!(attributes, " a{index}='x'").unwrap();
|
||||
}
|
||||
let rejected = format!("{opening}<g{attributes}>{image}</g></svg>");
|
||||
let error = svg::parse_with(rejected.as_bytes(), empty_fonts).err().expect("original attribute limits must apply before URL repair");
|
||||
let Err(error) = svg::parse_with(rejected.as_bytes(), empty_fonts) else {
|
||||
panic!("original attribute limits must apply before URL repair");
|
||||
};
|
||||
assert!(error.to_string().contains("attribute"), "{error}");
|
||||
|
||||
let accepted = format!(
|
||||
|
||||
Reference in new issue
Block a user