[librsvg: 6/8] Test when an image element has no href attribute




commit 8c2813648d3e61d43596c3e3f5a2c111e1245034
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Jul 7 16:55:31 2021 -0500

    Test when an image element has no href attribute

 tests/src/primitives.rs | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
---
diff --git a/tests/src/primitives.rs b/tests/src/primitives.rs
index 2afde00d..a9204149 100644
--- a/tests/src/primitives.rs
+++ b/tests/src/primitives.rs
@@ -1,6 +1,7 @@
 use cairo;
 
 use crate::reference_utils::{Compare, Evaluate, Reference};
+use crate::test_compare_render_output;
 use crate::utils::{load_svg, render_document, SurfaceSize};
 
 #[test]
@@ -358,3 +359,16 @@ fn nested_masks() {
         .compare(&output_surf)
         .evaluate(&output_surf, "nested_masks");
 }
+
+test_compare_render_output!(
+    image_element_with_no_href,
+    30,
+    30,
+    br##"<?xml version="1.0" encoding="UTF-8"?>
+    <svg xmlns="http://www.w3.org/2000/svg"; width="30" height="30">
+      <image x="10" y="10"/>
+    </svg>"##,
+    br##"<?xml version="1.0" encoding="UTF-8"?>
+    <svg xmlns="http://www.w3.org/2000/svg"; width="30" height="30">
+    </svg>"##,
+);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]