[librsvg/rustify-rsvg-convert: 15/41] rsvg-convert: preserve the current output for version




commit 50d4784e3bbf376e080c0aedbe4927b944c71ced
Author: Paolo Borelli <pborelli gnome org>
Date:   Fri Jan 8 15:05:59 2021 +0100

    rsvg-convert: preserve the current output for version

 src/bin/rsvg-convert/cli.rs       | 2 +-
 tests/src/cmdline/rsvg_convert.rs | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/bin/rsvg-convert/cli.rs b/src/bin/rsvg-convert/cli.rs
index 86a78a85..c096f595 100644
--- a/src/bin/rsvg-convert/cli.rs
+++ b/src/bin/rsvg-convert/cli.rs
@@ -39,7 +39,7 @@ pub struct Args {
 impl Args {
     pub fn new() -> Result<Self, clap::Error> {
         let app = clap::App::new("rsvg-convert")
-            .version(crate_version!())
+            .version(concat!("version ", crate_version!()))
             .about("SVG converter")
             .help_short("?")
             .version_short("v")
diff --git a/tests/src/cmdline/rsvg_convert.rs b/tests/src/cmdline/rsvg_convert.rs
index 9b07f41c..857e75f9 100644
--- a/tests/src/cmdline/rsvg_convert.rs
+++ b/tests/src/cmdline/rsvg_convert.rs
@@ -652,7 +652,7 @@ fn no_keep_image_data_option() {
 }
 
 fn is_version_output() -> AndPredicate<StartsWithPredicate, TrimPredicate<EndsWithPredicate>, str> {
-    starts_with("rsvg-convert ").and(ends_with_pkg_version().trim())
+    starts_with("rsvg-convert version ").and(ends_with_pkg_version().trim())
 }
 
 #[test]


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