[all] Fix newline in version string

This commit is contained in:
Ming-Hung Tsai
2021-05-12 02:12:11 +08:00
parent 965fbb6e8f
commit b7bf82b8f2
18 changed files with 38 additions and 34 deletions

View File

@@ -1,7 +1,7 @@
use anyhow::Result;
use std::str::from_utf8;
use thinp::file_utils;
use thinp::version::TOOLS_VERSION;
use thinp::version::tools_version;
mod common;
use common::test_dir::*;
@@ -12,14 +12,14 @@ use common::*;
#[test]
fn accepts_v() -> Result<()> {
let stdout = thin_restore!("-V").read()?;
assert_eq!(stdout, TOOLS_VERSION);
assert_eq!(stdout, tools_version());
Ok(())
}
#[test]
fn accepts_version() -> Result<()> {
let stdout = thin_restore!("--version").read()?;
assert_eq!(stdout, TOOLS_VERSION);
assert_eq!(stdout, tools_version());
Ok(())
}