aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBourgond Aries <macocio@gmail.com>2016-03-27 20:50:25 +0200
committerBourgond Aries <macocio@gmail.com>2016-03-27 20:50:25 +0200
commit770052a9a782efcc896b4dbf9452f73a1b5551ab (patch)
treed83de44d5b7f5e73671a9691f180c459cc2dda51
parent0e3e0654ba7454c4a09043064a15037d5b90e122 (diff)
downloadmilf-rs-770052a9a782efcc896b4dbf9452f73a1b5551ab.tar.gz
milf-rs-770052a9a782efcc896b4dbf9452f73a1b5551ab.zip
Add a test for lookup_mut_advanced
-rw-r--r--src/lib.rs9
1 files changed, 9 insertions, 0 deletions
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));
+ }
+
+
+
}