From f1767908837d0e6a0da2aa73009ce11de6fb359d Mon Sep 17 00:00:00 2001 From: pommicket Date: Wed, 10 Sep 2025 11:57:03 -0400 Subject: Remove schemas, add unread_keys --- src/tests/mod.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/tests/mod.rs') 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( + "", + " +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"]); } -- cgit v1.2.3