Add a test for lookup_mut_advanced

This commit is contained in:
Bourgond Aries 2016-03-27 20:50:25 +02:00
parent 0e3e0654ba
commit 770052a9a7

View file

@ -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));
}
}