diff options
| author | Zackery Spytz <zspytz@gmail.com> | 2018-08-18 22:43:38 -0600 |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-08-19 07:43:38 +0300 |
| commit | e349bf23584eef20e0d1e1b2989d9b1430f15507 (patch) | |
| tree | d698b962c27f07d0e6f1baf4fbe13fee145c60dc /Lib/test/test_codecs.py | |
| parent | d3d3171da895d8cb880f23fae6be778f0ac23be7 (diff) | |
| download | cpython-git-e349bf23584eef20e0d1e1b2989d9b1430f15507.tar.gz | |
bpo-22602: Raise an exception in the UTF-7 decoder for ill-formed sequences starting with "+". (GH-8741)
The UTF-7 decoder now raises UnicodeDecodeError for ill-formed
sequences starting with "+" (as specified in RFC 2152).
Diffstat (limited to 'Lib/test/test_codecs.py')
| -rw-r--r-- | Lib/test/test_codecs.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index a59a5e2135..86d0dde170 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -1020,6 +1020,7 @@ class UTF7Test(ReadTest, unittest.TestCase): (b'a+////,+IKw-b', 'a\uffff\ufffd\u20acb'), (b'a+IKw-b\xff', 'a\u20acb\ufffd'), (b'a+IKw\xffb', 'a\u20ac\ufffdb'), + (b'a+@b', 'a\ufffdb'), ] for raw, expected in tests: with self.subTest(raw=raw): |
