[librsvg: 3/5] tests: Check the output of rsvg-convert with export-id option




commit 4d806069d8057f117883cc4e268610a3c520db4c
Author: Sven Neumann <sven svenfoo org>
Date:   Thu Nov 5 15:56:55 2020 +0100

    tests: Check the output of rsvg-convert with export-id option
    
    Do not only test that the option is accepted, but also that it has
    an effect on the size of the generated PNG files.

 tests/src/cmdline/rsvg_convert.rs | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index d8b53c97..91ddb94c 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -567,7 +567,11 @@ fn stylesheet_option_error() {
 
 #[test]
 fn export_id_option() {
-    RsvgConvert::accepts_arg("--export-id=one");
+    RsvgConvert::new_with_input("tests/fixtures/api/geometry-element.svg")
+        .arg("--export-id=foo")
+        .assert()
+        .success()
+        .stdout(file::is_png().with_size(127, 127));
 }
 
 #[test]
@@ -576,7 +580,8 @@ fn export_id_short_option() {
         .arg("-i")
         .arg("two")
         .assert()
-        .success();
+        .success()
+        .stdout(file::is_png().with_size(90, 180));
 }
 
 #[test]


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]