]> granicus.if.org Git - python/commitdiff
test_whitespace_eater_unicode_2(): Test case for SF bug #710498.
authorBarry Warsaw <barry@python.org>
Sun, 30 Mar 2003 20:47:22 +0000 (20:47 +0000)
committerBarry Warsaw <barry@python.org>
Sun, 30 Mar 2003 20:47:22 +0000 (20:47 +0000)
Lib/email/test/test_email.py

index 280b400161caa3c01992f83bbcd65221c3d919f7..7659e2a37de92d43d1eb2da48a64d954a2461f5e 100644 (file)
@@ -1310,6 +1310,15 @@ class TestRFC2047(unittest.TestCase):
         hu = make_header(dh).__unicode__().encode('latin-1')
         eq(hu, 'Andr\xe9 Pirard <pirard@dom.ain>')
 
+    def test_whitespace_eater_unicode_2(self):
+        eq = self.assertEqual
+        s = 'The =?iso-8859-1?b?cXVpY2sgYnJvd24gZm94?= jumped over the =?iso-8859-1?b?bGF6eSBkb2c=?='
+        dh = decode_header(s)
+        eq(dh, [('The', None), ('quick brown fox', 'iso-8859-1'),
+                ('jumped over the', None), ('lazy dog', 'iso-8859-1')])
+        hu = make_header(dh).__unicode__()
+        eq(hu, u'The quick brown fox jumped over the lazy dog')
+
 
 \f
 # Test the MIMEMessage class