mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 14:52:33 +00:00
Updated tests.
This commit is contained in:
parent
abef54862d
commit
49cb37b303
2 changed files with 5 additions and 5 deletions
|
@ -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");
|
||||
}
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue