[librsvg: 2/8] rsvg-convert: Test error message for invalid lengths
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/8] rsvg-convert: Test error message for invalid lengths
- Date: Wed, 7 Jul 2021 23:20:26 +0000 (UTC)
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]