clap/tests/display_order.rs
Kevin K 14c8850019
tests: fixes test to new default behavior
This commit corrects tests to not expect the `-V,--version` flag when no
version information has been provided.
2021-10-09 11:12:50 -04:00

26 lines
444 B
Rust

mod utils;
use clap::App;
#[test]
fn very_large_display_order() {
let app = App::new("test").subcommand(App::new("sub").display_order(usize::MAX));
assert!(utils::compare_output(
app,
"test --help",
"test
USAGE:
test [SUBCOMMAND]
FLAGS:
-h, --help Print help information
SUBCOMMANDS:
help Print this message or the help of the given subcommand(s)
sub
",
false
));
}