diff options
Diffstat (limited to 'structopt/tests/explicit_name_no_renaming.rs')
-rw-r--r-- | structopt/tests/explicit_name_no_renaming.rs | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/structopt/tests/explicit_name_no_renaming.rs b/structopt/tests/explicit_name_no_renaming.rs deleted file mode 100644 index eff7a86..0000000 --- a/structopt/tests/explicit_name_no_renaming.rs +++ /dev/null @@ -1,32 +0,0 @@ -mod utils; - -use structopt::StructOpt; -use utils::*; - -#[test] -fn explicit_short_long_no_rename() { - #[derive(StructOpt, PartialEq, Debug)] - struct Opt { - #[structopt(short = ".", long = ".foo")] - foo: Vec<String>, - } - - assert_eq!( - Opt { - foo: vec!["short".into(), "long".into()] - }, - Opt::from_iter(&["test", "-.", "short", "--.foo", "long"]) - ); -} - -#[test] -fn explicit_name_no_rename() { - #[derive(StructOpt, PartialEq, Debug)] - struct Opt { - #[structopt(name = ".options")] - foo: Vec<String>, - } - - let help = get_long_help::<Opt>(); - assert!(help.contains("[.options]...")) -} |