aboutsummaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 88d8072..9af0c70 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -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();