summaryrefslogtreecommitdiffstats
path: root/Lib/email
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2003-03-06 16:11:14 (GMT)
committerBarry Warsaw <barry@python.org>2003-03-06 16:11:14 (GMT)
commitc79ffb022f5ddba0dd88fff877b69d10e8690edd (patch)
treed37b15fffa1ae1ed4b6f0b32cb890fb41785c894 /Lib/email
parent484880534160893c610e5e3a723cf8a3d9f8f116 (diff)
downloadcpython-c79ffb022f5ddba0dd88fff877b69d10e8690edd.zip
cpython-c79ffb022f5ddba0dd88fff877b69d10e8690edd.tar.gz
cpython-c79ffb022f5ddba0dd88fff877b69d10e8690edd.tar.bz2
test_whitespace_eater_unicode(): Test of the last outstanding bug in
SF # 640110.
Diffstat (limited to 'Lib/email')
-rw-r--r--Lib/email/test/test_email.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index 542ddcd..50287af 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -1207,6 +1207,14 @@ class TestRFC2047(unittest.TestCase):
"""Re: =?mac-iceland?q?r=8Aksm=9Arg=8Cs?= baz foo bar
=?mac-iceland?q?r=8Aksm=9Arg=8Cs?=""")
+ def test_whitespace_eater_unicode(self):
+ eq = self.assertEqual
+ s = '=?ISO-8859-1?Q?Andr=E9?= Pirard <pirard@dom.ain>'
+ dh = decode_header(s)
+ eq(dh, [('Andr\xe9', 'iso-8859-1'), ('Pirard <pirard@dom.ain>', None)])
+ hu = unicode(make_header(dh)).encode('latin-1')
+ eq(hu, 'Andr\xe9 Pirard <pirard@dom.ain>')
+
# Test the MIMEMessage class