diff --git a/Cargo.toml b/Cargo.toml index b71f25c54a3..40e798f16bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,8 +23,8 @@ appveyor = { repository = "kbknapp/clap-rs" } bitflags = "0.9" vec_map = "0.8" unicode-width = "0.1.4" -unicode-segmentation = "1.2.0" -textwrap = "0.7.0" +unicode-segmentation = "1.2.0" +textwrap = "0.8.0" strsim = { version = "0.6.0", optional = true } ansi_term = { version = "0.9.0", optional = true } term_size = { version = "0.3.0", optional = true } diff --git a/tests/help.rs b/tests/help.rs index ef354ca9f12..f84580d0588 100644 --- a/tests/help.rs +++ b/tests/help.rs @@ -431,6 +431,15 @@ ARGS: ... First ... Second"; +static DEFAULT_HELP: &'static str = "ctest + +USAGE: + ctest + +FLAGS: + -h, --help Prints help information + -V, --version Prints version information"; + #[test] fn help_short() { let m = App::new("test") @@ -592,6 +601,12 @@ fn no_wrap_help() { assert!(test::compare_output(app, "ctest --help", MULTI_SC_HELP, false)); } +#[test] +fn no_wrap_default_help() { + let app = App::new("ctest").set_term_width(0); + assert!(test::compare_output(app, "ctest --help", DEFAULT_HELP, false)); +} + #[test] fn complex_subcommand_help_output() { let a = test::complex_app();