[librsvg: 23/35] Test that both --page-width and --page-height are specified in the command line
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 23/35] Test that both --page-width and --page-height are specified in the command line
- Date: Thu, 17 Jun 2021 19:31:39 +0000 (UTC)
commit 2cc52d391f4205a5e241e15a20ad7d5bd47e6127
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Jun 16 11:22:38 2021 -0500
Test that both --page-width and --page-height are specified in the command line
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/547>
tests/src/cmdline/rsvg_convert.rs | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
---
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index 4f983be2..b0856fc7 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -576,6 +576,24 @@ fn pdf_page_size() {
.stdout(file::is_pdf().with_page_size(210.0 / 25.4 * 72.0, 297.0 / 25.4 * 72.0));
}
+#[cfg(system_deps_have_cairo_pdf)]
+#[test]
+fn missing_page_size_yields_error() {
+ RsvgConvert::new_with_input("tests/fixtures/cmdline/dimensions-in.svg")
+ .arg("--format=pdf")
+ .arg("--page-width=210mm")
+ .assert()
+ .failure()
+ .stderr(contains("both").and(contains("options")));
+
+ RsvgConvert::new_with_input("tests/fixtures/cmdline/dimensions-in.svg")
+ .arg("--format=pdf")
+ .arg("--page-height=297mm")
+ .assert()
+ .failure()
+ .stderr(contains("both").and(contains("options")));
+}
+
#[test]
fn does_not_clip_partial_coverage_pixels() {
RsvgConvert::new_with_input("tests/fixtures/cmdline/677-partial-pixel.svg")
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]