summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2008-07-25 18:05:24 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2008-07-25 18:05:24 (GMT)
commit5ffd9e9cc99d949e7e526c87be0c0fb2eea0225e (patch)
tree1f1f450c78452e75e37ea715914f85cde7e89f9c /Lib
parentabd9a597632e03219f7b32e2b8216ce288876ea0 (diff)
downloadcpython-5ffd9e9cc99d949e7e526c87be0c0fb2eea0225e.zip
cpython-5ffd9e9cc99d949e7e526c87be0c0fb2eea0225e.tar.gz
cpython-5ffd9e9cc99d949e7e526c87be0c0fb2eea0225e.tar.bz2
Merged revisions 65227 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r65227 | antoine.pitrou | 2008-07-25 19:45:59 +0200 (ven., 25 juil. 2008) | 3 lines #2242: utf7 decoding crashes on bogus input on some Windows/MSVC versions ........
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_unicode.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index e6b3cb0..604fdf2 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -847,6 +847,9 @@ class UnicodeTest(
self.assertEqual(str(b'+3ADYAA-', 'utf-7', 'replace'), '\ufffd')
+ # Issue #2242: crash on some Windows/MSVC versions
+ self.assertRaises(UnicodeDecodeError, b'+\xc1'.decode, 'utf-7')
+
def test_codecs_utf8(self):
self.assertEqual(''.encode('utf-8'), b'')
self.assertEqual('\u20ac'.encode('utf-8'), b'\xe2\x82\xac')