diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-08 12:01:29 (GMT) | 
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-02-08 12:01:29 (GMT) | 
| commit | 016a3f33a533bdec6977639bfa83b7f93f6c8c88 (patch) | |
| tree | d0f6562afddc85754ba5bcb0637a74d21b86fad0 /Lib/test | |
| parent | 1e949890f618867b7eabc1c08873611e960f5d03 (diff) | |
| download | cpython-016a3f33a533bdec6977639bfa83b7f93f6c8c88.zip cpython-016a3f33a533bdec6977639bfa83b7f93f6c8c88.tar.gz cpython-016a3f33a533bdec6977639bfa83b7f93f6c8c88.tar.bz2  | |
Issue #20538: UTF-7 incremental decoder produced inconsistant string when
input was truncated in BASE64 section.
Diffstat (limited to 'Lib/test')
| -rw-r--r-- | Lib/test/test_codecs.py | 39 | 
1 files changed, 33 insertions, 6 deletions
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py index 2c6dce7..cb618ec 100644 --- a/Lib/test/test_codecs.py +++ b/Lib/test/test_codecs.py @@ -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',              ]          )  | 
