diff --git a/clap_derive/tests/subcommands.rs b/clap_derive/tests/subcommands.rs index d700eb6c..b2a9fdb3 100644 --- a/clap_derive/tests/subcommands.rs +++ b/clap_derive/tests/subcommands.rs @@ -166,7 +166,7 @@ fn global_passed_down() { #[derive(Debug, PartialEq, Clap)] struct Opt { #[clap(global = true, long)] - global: bool, + other: bool, #[clap(subcommand)] sub: Subcommands, } @@ -180,22 +180,22 @@ fn global_passed_down() { #[derive(Debug, PartialEq, Clap)] struct GlobalCmd { #[clap(from_global)] - global: bool, + other: bool, } assert_eq!( Opt::parse_from(&["test", "global"]), Opt { - global: false, - sub: Subcommands::Global(GlobalCmd { global: false }) + other: false, + sub: Subcommands::Global(GlobalCmd { other: false }) } ); assert_eq!( - Opt::parse_from(&["test", "global", "--global"]), + Opt::parse_from(&["test", "global", "--other"]), Opt { - global: true, - sub: Subcommands::Global(GlobalCmd { global: true }) + other: true, + sub: Subcommands::Global(GlobalCmd { other: true }) } ); }