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