diff options
author | Lyuben Todorov <lyuben.todorov@gmail.com> | 2021-03-19 11:05:11 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-03-26 17:01:35 +0100 |
commit | b2a44a0fd4b11cdabf52267d09f09d5a2499a212 (patch) | |
tree | cb0283f9ddefd62f8d6727f54ca477f6cc1877e6 /tests/env.rs | |
parent | 20d37720b0342e68cd3c8c2c2a437b8634ec3642 (diff) |
Fix custom separator for group prefixes
Diffstat (limited to 'tests/env.rs')
-rw-r--r-- | tests/env.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/env.rs b/tests/env.rs index bb1a1ec..ffc0572 100644 --- a/tests/env.rs +++ b/tests/env.rs @@ -71,3 +71,14 @@ fn test_empty_value_is_ignored() { env::remove_var("C_A_B"); } + +#[test] +fn test_custom_separator_behavior() { + env::set_var("C.B.A", "abc"); + + let environment = Environment::with_prefix("C").separator("."); + + assert!(environment.collect().unwrap().contains_key("b.a")); + + env::remove_var("C.B.A"); +} |