summaryrefslogtreecommitdiffstats
path: root/tests/env.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/env.rs')
-rw-r--r--tests/env.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/env.rs b/tests/env.rs
index edd8dff..90852e0 100644
--- a/tests/env.rs
+++ b/tests/env.rs
@@ -86,6 +86,19 @@ fn test_custom_separator_behavior() {
}
#[test]
+fn test_custom_prefix_separator_behavior() {
+ env::set_var("C-B.A", "abc");
+
+ let environment = Environment::with_prefix("C")
+ .separator(".")
+ .prefix_separator("-");
+
+ assert!(environment.collect().unwrap().contains_key("b.a"));
+
+ env::remove_var("C-B.A");
+}
+
+#[test]
fn test_parse_int() {
// using a struct in an enum here to make serde use `deserialize_any`
#[derive(Deserialize, Debug)]