diff --git a/src/parser.rs b/src/parser.rs index 389d27d..f97645d 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -683,6 +683,23 @@ impl<'a> Parser<'a> { mod tests { use super::Parser; + #[test] + fn crlf() { + let mut p = Parser::new("\ +[project]\r\n\ +\r\n\ +name = \"splay\"\r\n\ +version = \"0.1.0\"\r\n\ +authors = [\"alex@crichton.co\"]\r\n\ +\r\n\ +[[lib]]\r\n\ +\r\n\ +path = \"lib.rs\"\r\n\ +name = \"splay\"\r\n\ +"); + assert!(p.parse().is_some()); + } + #[test] fn linecol() { let p = Parser::new("ab\ncde\nf");