mirror of
https://github.com/v0l/m3u8-rs.git
synced 2025-06-20 02:20:30 +00:00
Fix failed test on CLRF
This commit is contained in:
22
tests/lib.rs
22
tests/lib.rs
@ -199,13 +199,29 @@ fn quotes() {
|
||||
Result::Ok(("rest".as_bytes(), "value".to_string()))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn consume_line_empty() {
|
||||
assert_eq!(
|
||||
consume_line(b"\r\nrest"),
|
||||
Result::Err(nom::Err::Error(("\r\nrest".as_bytes(), nom::error::ErrorKind::IsNot)))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn consume_empty_line() {
|
||||
let line = consume_line(b"\r\nrest");
|
||||
println!("{:?}", line);
|
||||
fn consume_line_n() {
|
||||
assert_eq!(
|
||||
consume_line(b"before\nrest"),
|
||||
Result::Ok(("rest".as_bytes(), "before".into()))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn consume_line_rn() {
|
||||
assert_eq!(
|
||||
consume_line(b"before\r\nrest"),
|
||||
Result::Ok(("rest".as_bytes(), "before".into()))
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user