fix mailparsing test

This commit is contained in:
dignifiedquire
2019-11-30 18:49:15 +01:00
parent 7d3a56a870
commit 64fcd56998

View File

@@ -377,41 +377,29 @@ mod tests {
} }
} }
// FIXME: https://github.com/staktrace/mailparse/issues/49 #[test]
// #[test] fn test_mailmime_parse() {
// fn test_mailmime_parse() { let plain = b"Chat-Disposition-Notification-To: hello@world.de
// let plain = b"Chat-Disposition-Notification-To: hello@world.de Chat-Group-ID: CovhGgau8M-
// Chat-Group-ID: CovhGgau8M- Chat-Group-Name: Delta Chat Dev
// Chat-Group-Name: Delta Chat Dev Subject: =?utf-8?Q?Chat=3A?= Delta Chat =?utf-8?Q?Dev=3A?= sidenote for
// Subject: =?utf-8?Q?Chat=3A?= Delta Chat =?utf-8?Q?Dev=3A?= sidenote for =?utf-8?Q?all=3A?= rust core master ...
// =?utf-8?Q?all=3A?= rust core master ... Content-Type: text/plain; charset=\"utf-8\"; protected-headers=\"v1\"
// Content-Type: text/plain; charset=\"utf-8\"; protected-headers=\"v1\" Content-Transfer-Encoding: quoted-printable
// Content-Transfer-Encoding: quoted-printable
// sidenote for all: things are trick atm recomm= sidenote for all: things are trick atm recomm=
// end not to try to run with desktop or ios unless you are ready to hunt bugs end not to try to run with desktop or ios unless you are ready to hunt bugs
// -- =20 -- =20
// Sent with my Delta Chat Messenger: https://delta.chat"; Sent with my Delta Chat Messenger: https://delta.chat";
// let mail = mailparse::parse_mail(plain).expect("failed to parse valid message"); let mail = mailparse::parse_mail(plain).expect("failed to parse valid message");
// println!( assert_eq!(mail.headers.len(), 6);
// "{:?}", assert!(
// mail.headers mail.get_body().unwrap().starts_with(
// .iter() "sidenote for all: things are trick atm recommend not to try to run with desktop or ios unless you are ready to hunt bugs")
// .map(|h| (h.get_key(), h.get_value())) );
// .collect::<Vec<_>>() }
// );
// assert_eq!(mail.headers.len(), 6);
// assert_eq!(
// mail.get_body().unwrap(),
// " sidenote for all: things are trick atm recomm=
// end not to try to run with desktop or ios unless you are ready to hunt bugs
// -- =20
// Sent with my Delta Chat Messenger: https://delta.chat"
// );
// }
mod load_or_generate_self_public_key { mod load_or_generate_self_public_key {
use super::*; use super::*;