diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py index 8950e0d17a7..280b400161c 100644 --- a/Lib/email/test/test_email.py +++ b/Lib/email/test/test_email.py @@ -841,6 +841,22 @@ def test_another_long_multiline_header(self): ''') + def test_long_lines_with_different_header(self): + eq = self.ndiffAssertEqual + h = """\ +List-Unsubscribe: , + """ + msg = Message() + msg['List'] = h + msg['List'] = Header(h, header_name='List') + eq(msg.as_string(), """\ +List: List-Unsubscribe: , + +List: List-Unsubscribe: , + + +""") + # Test mangling of "From " lines in the body of a message