[librsvg/rustify-rsvg-convert: 32/78] tests: Adjust test for size overflow
- From: Sven Neumann <sneumann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg/rustify-rsvg-convert: 32/78] tests: Adjust test for size overflow
- Date: Wed, 3 Feb 2021 10:18:30 +0000 (UTC)
commit ac208df0188cfde62afceb9454cce50ba67f0566
Author: Sven Neumann <sven svenfoo org>
Date: Tue Nov 17 14:41:21 2020 +0100
tests: Adjust test for size overflow
This SVG used to result in the error message "Could not get dimensions",
but the actual issue with that SVG is that rendering would overflow the
image surface limits of cairo, which is better described by the error
message that rsvg-convert yields now.
tests/src/cmdline/rsvg_convert.rs | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index a218bf74..a64bc4c1 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -407,13 +407,13 @@ fn y_short_option() {
#[test]
fn huge_zoom_factor_yields_error() {
- let starts_with = starts_with("The resulting image would be larger than 32767 pixels");
- let ends_with = ends_with("Please specify a smaller size.");
RsvgConvert::new_with_input("tests/fixtures/dimensions/521-with-viewbox.svg")
.arg("--zoom=1000")
.assert()
.failure()
- .stderr(starts_with.and(ends_with).trim());
+ .stderr(starts_with(
+ "The resulting image would be larger than 32767 pixels",
+ ));
}
#[test]
@@ -645,7 +645,9 @@ fn overflowing_size_is_detected() {
RsvgConvert::new_with_input("tests/fixtures/render-crash/591-vbox-overflow.svg")
.assert()
.failure()
- .stderr(contains("Could not get dimensions").trim());
+ .stderr(starts_with(
+ "The resulting image would be larger than 32767 pixels",
+ ));
}
#[test]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]