mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue #20538: UTF-7 incremental decoder produced inconsistant string when
input was truncated in BASE64 section.
This commit is contained in:
parent
1e949890f6
commit
016a3f33a5
3 changed files with 45 additions and 7 deletions
|
@ -852,13 +852,40 @@ class UTF7Test(ReadTest, unittest.TestCase):
|
|||
|
||||
def test_partial(self):
|
||||
self.check_partial(
|
||||
"a+-b",
|
||||
'a+-b\x00c\x80d\u0100e\U00010000f',
|
||||
[
|
||||
"a",
|
||||
"a",
|
||||
"a+",
|
||||
"a+-",
|
||||
"a+-b",
|
||||
'a',
|
||||
'a',
|
||||
'a+',
|
||||
'a+-',
|
||||
'a+-b',
|
||||
'a+-b',
|
||||
'a+-b',
|
||||
'a+-b',
|
||||
'a+-b',
|
||||
'a+-b\x00',
|
||||
'a+-b\x00c',
|
||||
'a+-b\x00c',
|
||||
'a+-b\x00c',
|
||||
'a+-b\x00c',
|
||||
'a+-b\x00c',
|
||||
'a+-b\x00c\x80',
|
||||
'a+-b\x00c\x80d',
|
||||
'a+-b\x00c\x80d',
|
||||
'a+-b\x00c\x80d',
|
||||
'a+-b\x00c\x80d',
|
||||
'a+-b\x00c\x80d',
|
||||
'a+-b\x00c\x80d\u0100',
|
||||
'a+-b\x00c\x80d\u0100e',
|
||||
'a+-b\x00c\x80d\u0100e',
|
||||
'a+-b\x00c\x80d\u0100e',
|
||||
'a+-b\x00c\x80d\u0100e',
|
||||
'a+-b\x00c\x80d\u0100e',
|
||||
'a+-b\x00c\x80d\u0100e',
|
||||
'a+-b\x00c\x80d\u0100e',
|
||||
'a+-b\x00c\x80d\u0100e',
|
||||
'a+-b\x00c\x80d\u0100e\U00010000',
|
||||
'a+-b\x00c\x80d\u0100e\U00010000f',
|
||||
]
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue