mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-17 15:46:44 +00:00
fix(GODT-2966): Allow permissive parsing of MediaType parameters for import.
This commit is contained in:
@ -539,6 +539,18 @@ func TestParseMultipartAlternativeLatin1(t *testing.T) {
|
||||
assert.Equal(t, "*aoeuaoeu*\n\n", string(m.PlainBody))
|
||||
}
|
||||
|
||||
func TestParseMultipartAttachmentEncodedButUnquoted(t *testing.T) {
|
||||
f := getFileReader("multipart_attachment_encoded_no_quote.eml")
|
||||
|
||||
p, err := parser.New(f)
|
||||
require.NoError(t, err)
|
||||
|
||||
m, err := ParseWithParser(p, false)
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, `"Bridge Test" <bridgetest@pm.test>`, m.Sender.String())
|
||||
assert.Equal(t, `"Internal Bridge" <bridgetest@protonmail.com>`, m.ToList[0].String())
|
||||
}
|
||||
|
||||
func TestParseWithTrailingEndOfMailIndicator(t *testing.T) {
|
||||
f := getFileReader("text_html_trailing_end_of_mail.eml")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user