mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 04:46:29 +03:00
fix tests
This commit is contained in:
committed by
holger krekel
parent
3b64748427
commit
e1df41c209
@@ -1257,13 +1257,13 @@ mod tests {
|
|||||||
#[ignore]
|
#[ignore]
|
||||||
#[test]
|
#[test]
|
||||||
fn test_dc_mailmime_parse_crash_fuzzy(data in "[!-~\t ]{2000,}") {
|
fn test_dc_mailmime_parse_crash_fuzzy(data in "[!-~\t ]{2000,}") {
|
||||||
// this test doesn't exercise much of dc_mimeparser anymore
|
|
||||||
// because a missing From-field early aborts parsing
|
|
||||||
let context = dummy_context();
|
let context = dummy_context();
|
||||||
let mut mimeparser = MimeParser::new(&context.ctx);
|
let mut mimeparser = MimeParser::new(&context.ctx);
|
||||||
unsafe {
|
|
||||||
assert!(mimeparser.parse(data.as_bytes()).is_err());
|
// parsing should always succeed
|
||||||
}
|
// but the returned header will normally be empty on random data
|
||||||
|
assert!(unsafe {mimeparser.parse(data.as_bytes()).is_ok()});
|
||||||
|
assert!(mimeparser.header.is_empty());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user