From 151e830157cf12ef882ba502e9344350d999ed4d Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Thu, 15 Apr 2021 23:46:10 +0300 Subject: [PATCH] chore: add more tests --- itconfig-tests/tests/config_macro.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/itconfig-tests/tests/config_macro.rs b/itconfig-tests/tests/config_macro.rs index e1ad3ac..8cf4b75 100644 --- a/itconfig-tests/tests/config_macro.rs +++ b/itconfig-tests/tests/config_macro.rs @@ -537,6 +537,11 @@ mod test_case_23 { itconfig::config! { SOMETHING: Option<&'static str>, + #[env_name = "SOMETHING"] + STD_SOMETHING: std::option::Option<&'static str>, + #[env_name = "SOMETHING"] + CORE_SOMETHING: core::option::Option<&'static str>, + NOTHING: Option<&'static str>, } @@ -547,6 +552,8 @@ mod test_case_23 { env::set_var("SOMETHING", "hello world"); assert_eq!(config::SOMETHING(), Some("hello world")); + assert_eq!(config::STD_SOMETHING(), Some("hello world")); + assert_eq!(config::CORE_SOMETHING(), Some("hello world")); assert_eq!(config::NOTHING(), None); } }