[librsvg: 1/8] rsvg-convert: test that unsupported units yield the correct error message




commit 90a8f2e7e53b2f4bf0a4d79a4fb0cdab925ba6d7
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Jul 7 14:05:13 2021 -0500

    rsvg-convert: test that unsupported units yield the correct error message

 tests/src/cmdline/rsvg_convert.rs | 9 +++++++++
 1 file changed, 9 insertions(+)
---
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index 49e72ed6..e7c746d1 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -373,6 +373,15 @@ fn width_and_height_options() {
         .stdout(file::is_png().with_size(300, 200));
 }
 
+#[test]
+fn unsupported_unit_in_width_and_height() {
+    RsvgConvert::new_with_input("tests/fixtures/dimensions/521-with-viewbox.svg")
+        .arg("--height=200ex")
+        .assert()
+        .failure()
+        .stderr(contains("supported units"));
+}
+
 #[test]
 fn zoom_factor() {
     RsvgConvert::new_with_input("tests/fixtures/dimensions/521-with-viewbox.svg")


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