2022-06-07 21:21:12 +00:00
|
|
|
use super::utils;
|
2021-09-17 01:54:43 +00:00
|
|
|
|
2022-02-12 03:48:29 +00:00
|
|
|
use clap::Command;
|
2021-09-17 01:54:43 +00:00
|
|
|
|
|
|
|
#[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));
|
2021-09-17 01:54:43 +00:00
|
|
|
|
2022-04-29 20:32:25 +00:00
|
|
|
utils::assert_output(
|
2022-02-14 21:47:20 +00:00
|
|
|
cmd,
|
2021-09-17 01:54:43 +00:00
|
|
|
"test --help",
|
2022-08-31 14:29:00 +00:00
|
|
|
"\
|
2022-09-07 16:03:55 +00:00
|
|
|
Usage: test [COMMAND]
|
2021-09-17 01:54:43 +00:00
|
|
|
|
2022-08-31 02:38:37 +00:00
|
|
|
Commands:
|
2022-09-07 20:29:15 +00:00
|
|
|
help Print this message or the help of the given subcommand(s)
|
|
|
|
sub
|
2022-08-26 15:59:27 +00:00
|
|
|
|
|
|
|
Options:
|
2023-01-03 16:49:43 +00:00
|
|
|
-h, --help Print help
|
2021-09-24 15:58:39 +00:00
|
|
|
",
|
2022-04-29 20:32:25 +00:00
|
|
|
false,
|
|
|
|
);
|
2021-09-17 01:54:43 +00:00
|
|
|
}
|