2021-11-30 15:31:19 +00:00
|
|
|
use crate::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
|
|
|
|
|
|
|
assert!(utils::compare_output(
|
2022-02-14 21:47:20 +00:00
|
|
|
cmd,
|
2021-09-17 01:54:43 +00:00
|
|
|
"test --help",
|
|
|
|
"test
|
|
|
|
|
|
|
|
USAGE:
|
|
|
|
test [SUBCOMMAND]
|
|
|
|
|
2021-10-11 22:01:33 +00:00
|
|
|
OPTIONS:
|
2021-10-08 17:05:40 +00:00
|
|
|
-h, --help Print help information
|
2021-09-17 01:54:43 +00:00
|
|
|
|
|
|
|
SUBCOMMANDS:
|
|
|
|
help Print this message or the help of the given subcommand(s)
|
2021-09-24 15:58:39 +00:00
|
|
|
sub
|
|
|
|
",
|
2021-09-17 01:54:43 +00:00
|
|
|
false
|
|
|
|
));
|
|
|
|
}
|