From d785ebc14e8d467d2387596562da280a19bfc726 Mon Sep 17 00:00:00 2001 From: NickHackman Date: Wed, 17 Jun 2020 01:53:53 -0400 Subject: [PATCH] fix: Flag Subcommands tests behind debug_asserts Tests that check conflicts are behind the `debug_assertions` feature --- tests/flag_subcommands.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/flag_subcommands.rs b/tests/flag_subcommands.rs index e4f4683e..f86f5a1e 100644 --- a/tests/flag_subcommands.rs +++ b/tests/flag_subcommands.rs @@ -241,6 +241,7 @@ fn flag_subcommand_multiple() { assert!(result_matches.is_present("print")); } +#[cfg(debug_assertions)] #[test] #[should_panic = "Short option names must be unique for each argument, but \'-f\' is used by both an App named \'some\' and an Arg named \'test\'"] fn flag_subcommand_short_conflict_with_arg() { @@ -250,6 +251,7 @@ fn flag_subcommand_short_conflict_with_arg() { .get_matches_from(vec!["myprog", "-f"]); } +#[cfg(debug_assertions)] #[test] #[should_panic = "Long option names must be unique for each argument, but \'--flag\' is used by both an App named \'some\' and an Arg named \'flag\'"] fn flag_subcommand_long_conflict_with_arg() {