From caf4071137bc12edeb1b631376a079f81f22c058 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 25 Jun 2014 07:00:10 -0700 Subject: Add a CRLF test --- src/parser.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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"); -- cgit v1.2.3