From 8f1c0cfbbdefb72e34a018c5a5778630f8cc5efb Mon Sep 17 00:00:00 2001 From: Kevin K Date: Wed, 21 Mar 2018 19:41:58 -0400 Subject: [PATCH] tests: fixes failing tests from new API additions --- tests/app_settings.rs | 9 +++++---- tests/tests.rs | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/app_settings.rs b/tests/app_settings.rs index 24281d0f..a4b2eeeb 100644 --- a/tests/app_settings.rs +++ b/tests/app_settings.rs @@ -498,11 +498,12 @@ fn leading_double_hyphen_trailingvararg() { #[test] fn unset_setting() { - let m = App::new("unset_setting"); - assert!(m.is_set(AppSettings::AllowInvalidUtf8)); + let m = App::new("unset_setting") + .setting(AppSettings::AllArgsOverrideSelf); + assert!(m.is_set(AppSettings::AllArgsOverrideSelf)); - let m = m.unset_setting(AppSettings::AllowInvalidUtf8); - assert!(!m.is_set(AppSettings::AllowInvalidUtf8)); + let m = m.unset_setting(AppSettings::AllArgsOverrideSelf); + assert!(!m.is_set(AppSettings::AllArgsOverrideSelf)); } #[test] diff --git a/tests/tests.rs b/tests/tests.rs index c6900dff..e4ef1c60 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -304,7 +304,7 @@ fn create_app() { #[test] fn add_multiple_arg() { let _ = App::new("test") - .args(&mut [ + .args(&[ Arg::with_name("test").short("s"), Arg::with_name("test2").short("l"), ])