diff options
Diffstat (limited to 'clap/tests/global_args.rs')
-rw-r--r-- | clap/tests/global_args.rs | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/clap/tests/global_args.rs b/clap/tests/global_args.rs deleted file mode 100644 index 4adc685..0000000 --- a/clap/tests/global_args.rs +++ /dev/null @@ -1,37 +0,0 @@ -extern crate clap; -extern crate regex; - -#[cfg(test)] -mod tests { - include!("../clap-test.rs"); - use clap::{App, Arg, SubCommand}; - - fn get_app() -> App<'static, 'static> { - App::new("myprog") - .arg(Arg::with_name("GLOBAL_ARG") - .long("global-arg") - .help( - "Specifies something needed by the subcommands", - ) - .global(true) - .takes_value(true) - .default_value("default_value")) - .arg(Arg::with_name("GLOBAL_FLAG") - .long("global-flag") - .help( - "Specifies something needed by the subcommands", - ) - .multiple(true) - .global(true)) - .subcommand(SubCommand::with_name("outer") - .subcommand(SubCommand::with_name("inner"))) - } - - #[test] - fn issue_1076() { - let mut app = get_app(); - let _ = app.get_matches_from_safe_borrow(vec!["myprog"]); - let _ = app.get_matches_from_safe_borrow(vec!["myprog"]); - let _ = app.get_matches_from_safe_borrow(vec!["myprog"]); - } -} |