Updated tests.

This commit is contained in:
Andreas Steding 2020-06-10 15:45:27 +02:00
parent abef54862d
commit 49cb37b303
2 changed files with 5 additions and 5 deletions

View file

@ -33,7 +33,7 @@ fn crate_version() {
assert_eq!(err.kind, ErrorKind::VersionDisplayed);
assert_eq!(
err.to_string(),
format!("prog {}", env!("CARGO_PKG_VERSION"))
format!("prog {}\n", env!("CARGO_PKG_VERSION"))
);
}
@ -70,5 +70,5 @@ fn crate_name() {
assert!(res.is_err());
let err = res.unwrap_err();
assert_eq!(err.kind, ErrorKind::VersionDisplayed);
assert_eq!(err.to_string(), "clap ");
assert_eq!(err.to_string(), "clap \n");
}

View file

@ -4,7 +4,7 @@ use std::str;
use clap::{App, AppSettings, ErrorKind};
static VERSION: &str = "clap-test v1.4.8";
static VERSION: &str = "clap-test v1.4.8\n";
#[test]
fn version_short() {
@ -17,7 +17,7 @@ fn version_short() {
assert!(m.is_err());
let err = m.unwrap_err();
assert_eq!(err.kind, ErrorKind::VersionDisplayed);
assert_eq!(err.to_string(), "test 1.3");
assert_eq!(err.to_string(), "test 1.3\n");
}
#[test]
@ -31,7 +31,7 @@ fn version_long() {
assert!(m.is_err());
let err = m.unwrap_err();
assert_eq!(err.kind, ErrorKind::VersionDisplayed);
assert_eq!(err.to_string(), "test 1.3");
assert_eq!(err.to_string(), "test 1.3\n");
}
#[test]