Add a CRLF test
This commit is contained in:
parent
66c83483f8
commit
caf4071137
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue