diff options
author | pommicket <pommicket@gmail.com> | 2025-09-10 11:57:03 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2025-09-10 11:57:03 -0400 |
commit | f1767908837d0e6a0da2aa73009ce11de6fb359d (patch) | |
tree | 8cb03ac742d3e7d2f36ccf38a319b5bc13cf4685 /src/tests/mod.rs | |
parent | ed0182736a20e0987c6dc9c5e086a30fd1b02f8b (diff) |
Remove schemas, add unread_keys
Diffstat (limited to 'src/tests/mod.rs')
-rw-r--r-- | src/tests/mod.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/tests/mod.rs b/src/tests/mod.rs index 6c40f6f..b7f9d3a 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -70,4 +70,23 @@ bar.y = 6 let mut keys: Vec<_> = conf.keys().collect(); keys.sort(); assert_eq!(keys, ["a", "foo"]); + + let conf = Configuration::load( + "<test configuration 2>", + " +x = 5 +x.y = 6 +x.y.z = 7 +foo = 12 +bar = 16 +" + .as_bytes(), + ) + .unwrap(); + conf.get_int("foo").unwrap().unwrap(); + conf.get_int("x").unwrap().unwrap(); + conf.section("x.y").get_int("z").unwrap().unwrap(); + let mut unread: Vec<&str> = conf.unread_keys().collect(); + unread.sort(); + assert_eq!(unread, ["bar", "x.y"]); } |