[Python-checkins] cpython: #2658: Add test for issue fixed by fix for #1079.
r.david.murray
python-checkins at python.org
Sun Jun 3 18:27:20 CEST 2012
http://hg.python.org/cpython/rev/0808cb8c60fd
changeset: 77328:0808cb8c60fd
user: R David Murray <rdmurray at bitdance.com>
date: Sun Jun 03 12:27:07 2012 -0400
summary:
#2658: Add test for issue fixed by fix for #1079.
files:
Lib/test/test_email/test_email.py | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_email/test_email.py b/Lib/test/test_email/test_email.py
--- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py
@@ -2104,6 +2104,16 @@
self.assertEqual(make_header(decode_header(s)).encode(), s.lower())
self.assertEqual(str(make_header(decode_header(s))), '(a b)')
+ def test_multiline_header(self):
+ s = '=?windows-1252?q?=22M=FCller_T=22?=\r\n <T.Mueller at xxx.com>'
+ self.assertEqual(decode_header(s),
+ [(b'"M\xfcller T"', 'windows-1252'),
+ (b'<T.Mueller at xxx.com>', None)])
+ self.assertEqual(make_header(decode_header(s)).encode(),
+ ''.join(s.splitlines()))
+ self.assertEqual(str(make_header(decode_header(s))),
+ '"Müller T" <T.Mueller at xxx.com>')
+
# Test the MIMEMessage class
class TestMIMEMessage(TestEmailBase):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list