summaryrefslogtreecommitdiffstats
path: root/Lib/email/test
diff options
context:
space:
mode:
authorR. David Murray <rdmurray@bitdance.com>2010-10-01 15:48:49 (GMT)
committerR. David Murray <rdmurray@bitdance.com>2010-10-01 15:48:49 (GMT)
commit20ad3634af3dda11f71189f0997e4aa832a5c740 (patch)
tree4e1ee7c0e702671bd16b2c1e0393692aa26c8bd0 /Lib/email/test
parentcb5e22deff0823dd9ef2fa3cf4f35dc9c5f92285 (diff)
downloadcpython-20ad3634af3dda11f71189f0997e4aa832a5c740.zip
cpython-20ad3634af3dda11f71189f0997e4aa832a5c740.tar.gz
cpython-20ad3634af3dda11f71189f0997e4aa832a5c740.tar.bz2
Merged revisions 85142 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85142 | r.david.murray | 2010-10-01 11:40:20 -0400 (Fri, 01 Oct 2010) | 5 lines #10004: in Q encoded word ignore '=xx' when xx is not valid hex. Bug report and fix by Thomas Guettler. ........
Diffstat (limited to 'Lib/email/test')
-rw-r--r--Lib/email/test/test_email.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/email/test/test_email.py b/Lib/email/test/test_email.py
index 300fc21..c3610bf 100644
--- a/Lib/email/test/test_email.py
+++ b/Lib/email/test/test_email.py
@@ -1621,6 +1621,12 @@ class TestRFC2047(unittest.TestCase):
dh = decode_header(s % q)
self.assertEqual(dh, [(a, 'iso-8859-1')])
+ def test_rfc2047_Q_invalid_digits(self):
+ # issue 10004.
+ s = '=?iso-8659-1?Q?andr=e9=zz?='
+ self.assertEqual(decode_header(s),
+ [(b'andr\xe9=zz', 'iso-8659-1')])
+
# Test the MIMEMessage class
class TestMIMEMessage(TestEmailBase):