[librsvg: 2/8] rsvg-convert: Test error message for invalid lengths




commit 4aef73d2955269aaf1b44ddfa6b707146767656e
Author: Federico Mena Quintero <federico gnome org>
Date:   Wed Jul 7 14:22:44 2021 -0500

    rsvg-convert: Test error message for invalid lengths

 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 e7c746d1..0ecc1c88 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -382,6 +382,15 @@ fn unsupported_unit_in_width_and_height() {
         .stderr(contains("supported units"));
 }
 
+#[test]
+fn invalid_length() {
+    RsvgConvert::new_with_input("tests/fixtures/dimensions/521-with-viewbox.svg")
+        .arg("--page-width=foo")
+        .assert()
+        .failure()
+        .stderr(contains("can not be parsed as a length"));
+}
+
 #[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]