clap/tests/builder/display_order.rs
Ed Page 045bf99ae0 test: Consolidate builder tests
This is prep for moving the derive tests.  Besides organizing the test
folder for each API, this should reduce link time at the cost of
re-compiling more when a test changes.
2021-11-30 10:07:05 -06:00

26 lines
453 B
Rust

use crate::utils;
use clap::App;
#[test]
fn very_large_display_order() {
let app = App::new("test").subcommand(App::new("sub").display_order(usize::MAX));
assert!(utils::compare_output(
app,
"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
));
}