diff options
author | Bourgond Aries <macocio@gmail.com> | 2016-03-27 20:50:25 +0200 |
---|---|---|
committer | Bourgond Aries <macocio@gmail.com> | 2016-03-27 20:50:25 +0200 |
commit | 770052a9a782efcc896b4dbf9452f73a1b5551ab (patch) | |
tree | d83de44d5b7f5e73671a9691f180c459cc2dda51 | |
parent | 0e3e0654ba7454c4a09043064a15037d5b90e122 (diff) | |
download | milf-rs-770052a9a782efcc896b4dbf9452f73a1b5551ab.tar.gz milf-rs-770052a9a782efcc896b4dbf9452f73a1b5551ab.zip |
Add a test for lookup_mut_advanced
-rw-r--r-- | src/lib.rs | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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)); + } + + + } |