From 770052a9a782efcc896b4dbf9452f73a1b5551ab Mon Sep 17 00:00:00 2001 From: Bourgond Aries Date: Sun, 27 Mar 2016 20:50:25 +0200 Subject: [PATCH] Add a test for lookup_mut_advanced --- src/lib.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 760cdde..88d8072 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -445,4 +445,13 @@ mod tests { assert_eq!(*looked, Value::Integer(0)); } + #[test] + fn lookup_mut_advanced() { + let mut value: Value = "[table]\n\"value\" = [0, 1, 2]".parse().unwrap(); + let looked = value.lookup_mut("table.\"value\".1").unwrap(); + assert_eq!(*looked, Value::Integer(1)); + } + + + }