mirror of
https://github.com/clap-rs/clap
synced 2024-12-13 22:32:33 +00:00
Fix App::version/long_version test
This commit is contained in:
parent
3c049b4e22
commit
52e74fa305
1 changed files with 3 additions and 1 deletions
|
@ -12,6 +12,7 @@ fn version_short() {
|
|||
.author("Kevin K.")
|
||||
.about("tests stuff")
|
||||
.version("1.3")
|
||||
.long_version("1.3 (abcdef12)")
|
||||
.try_get_matches_from(vec!["myprog", "-V"]);
|
||||
|
||||
assert!(m.is_err());
|
||||
|
@ -26,12 +27,13 @@ fn version_long() {
|
|||
.author("Kevin K.")
|
||||
.about("tests stuff")
|
||||
.version("1.3")
|
||||
.long_version("1.3 (abcdef12)")
|
||||
.try_get_matches_from(vec!["myprog", "--version"]);
|
||||
|
||||
assert!(m.is_err());
|
||||
let err = m.unwrap_err();
|
||||
assert_eq!(err.kind, ErrorKind::DisplayVersion);
|
||||
assert_eq!(err.to_string(), "test 1.3\n");
|
||||
assert_eq!(err.to_string(), "test 1.3 (abcdef12)\n");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
Loading…
Reference in a new issue