clap/tests/builder/display_order.rs

27 lines
465 B
Rust
Raw Normal View History

use crate::utils;
2022-02-12 03:48:29 +00:00
use clap::Command;
#[test]
fn very_large_display_order() {
2022-02-14 21:47:20 +00:00
let cmd = Command::new("test").subcommand(Command::new("sub").display_order(usize::MAX));
assert!(utils::compare_output(
2022-02-14 21:47:20 +00:00
cmd,
"test --help",
"test
USAGE:
test [SUBCOMMAND]
OPTIONS:
-h, --help Print help information
SUBCOMMANDS:
help Print this message or the help of the given subcommand(s)
sub
",
false
));
}