mirror of
https://github.com/chatmail/core.git
synced 2026-05-02 04:46:29 +03:00
Restore newlines and remove semicolon in test_parse_first_addr
This commit is contained in:
committed by
holger krekel
parent
f6660af014
commit
4529c326c6
@@ -1130,8 +1130,8 @@ mod tests {
|
||||
fn test_parse_first_addr() {
|
||||
let context = dummy_context();
|
||||
let raw = b"From: hello@one.org, world@two.org\n\
|
||||
Chat-Disposition-Notification-To: wrong
|
||||
Content-Type: text/plain;
|
||||
Chat-Disposition-Notification-To: wrong\n\
|
||||
Content-Type: text/plain\n\
|
||||
Chat-Version: 1.0\n\
|
||||
\n\
|
||||
test1\n\
|
||||
@@ -1142,8 +1142,13 @@ mod tests {
|
||||
let of = mimeparser.parse_first_addr(HeaderDef::From_).unwrap();
|
||||
assert_eq!(of, mailparse::addrparse("hello@one.org").unwrap()[0]);
|
||||
|
||||
let of = mimeparser.parse_first_addr(HeaderDef::ChatDispositionNotificationTo);
|
||||
assert!(of.is_none());
|
||||
// XXX: the address does not contain "@", so it is wrong
|
||||
// addr-spec according to RFC 2822, but mailparse still parses
|
||||
// is as an address.
|
||||
let of = mimeparser
|
||||
.parse_first_addr(HeaderDef::ChatDispositionNotificationTo)
|
||||
.unwrap();
|
||||
assert_eq!(of, mailparse::addrparse("wrong").unwrap()[0]);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user