aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2014-06-25 07:00:10 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-06-26 19:27:42 -0700
commitcaf4071137bc12edeb1b631376a079f81f22c058 (patch)
tree72b491527d0d1a82309fe4062dbfc711bec6572a
parent66c83483f880c87e44c57617bec2615e945cce14 (diff)
downloadmilf-rs-caf4071137bc12edeb1b631376a079f81f22c058.tar.gz
milf-rs-caf4071137bc12edeb1b631376a079f81f22c058.zip
Add a CRLF test
-rw-r--r--src/parser.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/parser.rs b/src/parser.rs
index 389d27d..f97645d 100644
--- a/src/parser.rs
+++ b/src/parser.rs
@@ -684,6 +684,23 @@ 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");
assert_eq!(p.to_linecol(0), (0, 0));