diff options
author | Melody Horn <melody@boringcactus.com> | 2021-03-21 14:10:24 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-03-21 14:10:24 -0600 |
commit | 7bbbfd046324363c8db1fb15d39aeb02fe7331b5 (patch) | |
tree | a416bb991c23e083d0b5816dfc8b00cd1aceda78 /test-suite/tests/backcompat.rs | |
parent | b1417006df376e6c406bff43740dd11aa7ef744e (diff) | |
download | milf-rs-main.tar.gz milf-rs-main.zip |
Diffstat (limited to 'test-suite/tests/backcompat.rs')
-rw-r--r-- | test-suite/tests/backcompat.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test-suite/tests/backcompat.rs b/test-suite/tests/backcompat.rs index ef3bd36..7d4fcee 100644 --- a/test-suite/tests/backcompat.rs +++ b/test-suite/tests/backcompat.rs @@ -1,11 +1,11 @@ extern crate serde; -extern crate toml; +extern crate milf; use serde::de::Deserialize; macro_rules! bad { - ($toml:expr, $msg:expr) => { - match $toml.parse::<toml::Value>() { + ($milf:expr, $msg:expr) => { + match $milf.parse::<milf::Value>() { Ok(s) => panic!("parsed to: {:#?}", s), Err(e) => assert_eq!(e.to_string(), $msg), } @@ -23,9 +23,9 @@ fn newlines_after_tables() { "expected newline, found an identifier at line 2 column 13" ); - let mut d = toml::de::Deserializer::new(s); + let mut d = milf::de::Deserializer::new(s); d.set_require_newline_after_table(false); - let value = toml::Value::deserialize(&mut d).unwrap(); + let value = milf::Value::deserialize(&mut d).unwrap(); assert_eq!(value["a"]["foo"].as_integer(), Some(1)); assert_eq!(value["b"][0]["foo"].as_integer(), Some(1)); } @@ -47,9 +47,9 @@ fn allow_duplicate_after_longer() { "redefinition of table `dependencies` for key `dependencies` at line 8 column 9" ); - let mut d = toml::de::Deserializer::new(s); + let mut d = milf::de::Deserializer::new(s); d.set_allow_duplicate_after_longer_table(true); - let value = toml::Value::deserialize(&mut d).unwrap(); + let value = milf::Value::deserialize(&mut d).unwrap(); assert_eq!( value["dependencies"]["openssl-sys"]["version"].as_integer(), Some(1) |