cpython: 4d4aefa52f49 (original) (raw)

Mercurial > cpython

changeset 104392:4d4aefa52f49 3.6

Issue #28162: Fixes Ctrl+Z handling in console readall() [#28162]

Steve Dower steve.dower@microsoft.com
date Sat, 08 Oct 2016 12:37:33 -0700
parents 701e52103528
children 947fa496ca6f 6803a6478056
files Lib/test/test_winconsoleio.py Modules/_io/winconsoleio.c
diffstat 2 files changed, 52 insertions(+), 37 deletions(-)[+] [-] Lib/test/test_winconsoleio.py 40 Modules/_io/winconsoleio.c 49

line wrap: on

line diff

--- a/Lib/test/test_winconsoleio.py +++ b/Lib/test/test_winconsoleio.py @@ -107,16 +107,15 @@ class WindowsConsoleIOTests(unittest.Tes source = 'ϼўТλФЙ\r\n'.encode('utf-16-le') expected = 'ϼўТλФЙ\r\n'.encode('utf-8') for read_count in range(1, 16):

def test_partial_surrogate_reads(self): # Test that reading less than 1 full character works when stdin @@ -125,17 +124,24 @@ class WindowsConsoleIOTests(unittest.Tes source = '\U00101FFF\U00101001\r\n'.encode('utf-16-le') expected = '\U00101FFF\U00101001\r\n'.encode('utf-8') for read_count in range(1, 16):

+

-

if name == "main": unittest.main()

--- a/Modules/_io/winconsoleio.c +++ b/Modules/_io/winconsoleio.c @@ -816,44 +816,53 @@ static PyObject * PyMem_Free(subbuf);

len += n; }

+