diff options
-rw-r--r-- | src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -445,6 +445,13 @@ mod tests { assert_eq!(*looked, Value::Integer(0)); } + #[test] + fn lookup_advanced_table() { + let value: Value = r#"[table."name.other"] value = "my value""#.parse().unwrap(); + let looked = value.lookup(r#"table."name.other".value"#).unwrap(); + assert_eq!(*looked, Value::String(String::from("my value"))); + } + #[test] fn lookup_mut_advanced() { let mut value: Value = "[table]\n\"value\" = [0, 1, 2]".parse().unwrap(); |