[librsvg: 2/4] Add test case for multiple pages, and a single explicitly-specified size
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 2/4] Add test case for multiple pages, and a single explicitly-specified size
- Date: Tue, 12 Oct 2021 18:48:22 +0000 (UTC)
commit f7c0554ebfcb088093ff6c75a15f547a23ad0fab
Author: Michael Howell <michael notriddle com>
Date: Thu Oct 7 14:31:13 2021 -0700
Add test case for multiple pages, and a single explicitly-specified size
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/600>
tests/src/cmdline/rsvg_convert.rs | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
---
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index 0ad21b3e..dde03c58 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -656,6 +656,30 @@ fn pdf_page_size() {
.stdout(file::is_pdf().with_page_size(0, 210.0 / 25.4 * 72.0, 297.0 / 25.4 * 72.0));
}
+#[cfg(system_deps_have_cairo_pdf)]
+#[test]
+fn multiple_input_files_create_multi_page_pdf_size_override() {
+ let one = Path::new("tests/fixtures/dimensions/521-with-viewbox.svg");
+ let two = Path::new("tests/fixtures/dimensions/sub-rect-no-unit.svg");
+ let three = Path::new("tests/fixtures/api/example.svg");
+ RsvgConvert::new()
+ .arg("--format=pdf")
+ .arg("--width=300pt")
+ .arg("--height=200pt")
+ .arg(one)
+ .arg(two)
+ .arg(three)
+ .assert()
+ .success()
+ .stdout(
+ file::is_pdf()
+ .with_page_count(3)
+ .and(file::is_pdf().with_page_size(0, 300.0, 200.0))
+ .and(file::is_pdf().with_page_size(1, 300.0, 200.0))
+ .and(file::is_pdf().with_page_size(2, 300.0, 200.0)),
+ );
+}
+
#[cfg(system_deps_have_cairo_pdf)]
#[test]
fn missing_page_size_yields_error() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]