clap/tests/builder/display_order.rs

25 lines
417 B
Rust
Raw Normal View History

use super::utils;
2022-02-11 21:48:29 -06:00
use clap::Command;
#[test]
fn very_large_display_order() {
2022-02-14 15:47:20 -06:00
let cmd = Command::new("test").subcommand(Command::new("sub").display_order(usize::MAX));
2022-04-29 15:32:25 -05:00
utils::assert_output(
2022-02-14 15:47:20 -06:00
cmd,
"test --help",
"\
Usage: test [COMMAND]
Commands:
help Print this message or the help of the given subcommand(s)
sub
Options:
-h, --help Print help
",
2022-04-29 15:32:25 -05:00
false,
);
}