[librsvg: 27/35] rsvg-convert: Add a test for rendering a PNG with a page size without an offset
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 27/35] rsvg-convert: Add a test for rendering a PNG with a page size without an offset
- Date: Thu, 17 Jun 2021 19:31:39 +0000 (UTC)
commit 3fd273922436d4105488e77169a0d42e41f66227
Author: Federico Mena Quintero <federico gnome org>
Date: Thu Jun 17 12:41:04 2021 -0500
rsvg-convert: Add a test for rendering a PNG with a page size without an offset
Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/547>
tests/fixtures/cmdline/zero-offset-png.png | Bin 0 -> 1419 bytes
tests/src/cmdline/rsvg_convert.rs | 12 ++++++++++++
2 files changed, 12 insertions(+)
---
diff --git a/tests/fixtures/cmdline/zero-offset-png.png b/tests/fixtures/cmdline/zero-offset-png.png
new file mode 100644
index 00000000..adbe9524
Binary files /dev/null and b/tests/fixtures/cmdline/zero-offset-png.png differ
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index b0856fc7..e00d6397 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -529,6 +529,18 @@ fn negative_resolution_is_invalid() {
.stderr(contains("Invalid resolution"));
}
+#[test]
+fn zero_offset_png() {
+ RsvgConvert::new_with_input("tests/fixtures/cmdline/dimensions-in.svg")
+ .arg("--page-width=640")
+ .arg("--page-height=480")
+ .arg("--width=200")
+ .arg("--height=100")
+ .assert()
+ .success()
+ .stdout(file::is_png().with_contents("tests/fixtures/cmdline/zero-offset-png.png"));
+}
+
#[cfg(system_deps_have_cairo_pdf)]
#[test]
fn unscaled_pdf_size() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]