Add a test for lookup_mut_advanced
This commit is contained in:
parent
0e3e0654ba
commit
770052a9a7
|
@ -445,4 +445,13 @@ mod tests {
|
||||||
assert_eq!(*looked, Value::Integer(0));
|
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));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue