summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-06-03 16:27:07 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-06-03 16:27:07 (GMT)
commit82ffabdfa4de985690c76fd7498a77e9604e1747 (patch)
tree7a6535cbd043ae4b57a44388bef8de0f761e61e1 /Lib/test
parentf20940792df1f3b1dbda3ec5fdd6a8b6bc9f96d5 (diff)
downloadcpython-82ffabdfa4de985690c76fd7498a77e9604e1747.zip
cpython-82ffabdfa4de985690c76fd7498a77e9604e1747.tar.gz
cpython-82ffabdfa4de985690c76fd7498a77e9604e1747.tar.bz2
#2658: Add test for issue fixed by fix for #1079.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_email/test_email.py10
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
index b7ad667..5aefc47 100644
--- a/Lib/test/test_email/test_email.py
+++ b/Lib/test/test_email/test_email.py
@@ -2104,6 +2104,16 @@ Re: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz foo bar =?mac-iceland?q?r=8Aksm?=
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@xxx.com>'
+ self.assertEqual(decode_header(s),
+ [(b'"M\xfcller T"', 'windows-1252'),
+ (b'<T.Mueller@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@xxx.com>')
+
# Test the MIMEMessage class
class TestMIMEMessage(TestEmailBase):