mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 12:56:30 +03:00
fix mailparsing test
This commit is contained in:
52
src/e2ee.rs
52
src/e2ee.rs
@@ -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::*;
|
||||||
|
|||||||
Reference in New Issue
Block a user