]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
test_whitespace_eater_unicode(): Test of the last outstanding bug in
authorBarry Warsaw <barry@python.org>
Thu, 6 Mar 2003 16:11:14 +0000 (16:11 +0000)
committerBarry Warsaw <barry@python.org>
Thu, 6 Mar 2003 16:11:14 +0000 (16:11 +0000)
SF # 640110.

Lib/email/test/test_email.py

index 542ddcda645765139601d2865b64d3b73d86b280..50287af2b66918e4842a567304ef58e1737d8f63 100644 (file)
@@ -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>')
+
 
 \f
 # Test the MIMEMessage class