mirror of
https://github.com/clap-rs/clap
synced 2024-12-12 22:02:35 +00:00
test(derive): Improve help output assertions
This commit is contained in:
parent
52e2874c03
commit
11fbe7e54b
1 changed files with 3 additions and 3 deletions
|
@ -363,7 +363,7 @@ OPTIONS:
|
||||||
let mut buffer: Vec<u8> = Default::default();
|
let mut buffer: Vec<u8> = Default::default();
|
||||||
cmd.write_help(&mut buffer).unwrap();
|
cmd.write_help(&mut buffer).unwrap();
|
||||||
let help = String::from_utf8(buffer).unwrap();
|
let help = String::from_utf8(buffer).unwrap();
|
||||||
assert_eq!(help, HELP);
|
snapbox::assert_eq(HELP, help);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -420,7 +420,7 @@ OPTIONS:
|
||||||
let mut buffer: Vec<u8> = Default::default();
|
let mut buffer: Vec<u8> = Default::default();
|
||||||
cmd.write_help(&mut buffer).unwrap();
|
cmd.write_help(&mut buffer).unwrap();
|
||||||
let help = String::from_utf8(buffer).unwrap();
|
let help = String::from_utf8(buffer).unwrap();
|
||||||
assert_eq!(help, HELP);
|
snapbox::assert_eq(HELP, help);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -476,5 +476,5 @@ OPTIONS:
|
||||||
let mut buffer: Vec<u8> = Default::default();
|
let mut buffer: Vec<u8> = Default::default();
|
||||||
cmd.write_help(&mut buffer).unwrap();
|
cmd.write_help(&mut buffer).unwrap();
|
||||||
let help = String::from_utf8(buffer).unwrap();
|
let help = String::from_utf8(buffer).unwrap();
|
||||||
assert_eq!(help, HELP);
|
snapbox::assert_eq(HELP, help);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue