diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-11-01 18:48:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-01 18:48:49 (GMT) |
commit | 4f469c096628af730b17798d0ebfd8925bfde836 (patch) | |
tree | a161dd6075c64a45b7f16713a48df39d3c618b76 /Lib/test | |
parent | 7e68790f3db75a893d5dd336e6201a63bc70212b (diff) | |
download | cpython-4f469c096628af730b17798d0ebfd8925bfde836.zip cpython-4f469c096628af730b17798d0ebfd8925bfde836.tar.gz cpython-4f469c096628af730b17798d0ebfd8925bfde836.tar.bz2 |
bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse(). (#4220)
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_curses.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 8bb6630..17b3af4 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -92,7 +92,7 @@ class TestCurses(unittest.TestCase): with self.subTest(meth=meth.__qualname__, args=args): meth(*args) - for meth in [stdscr.box, stdscr.clear, stdscr.clrtobot, + for meth in [stdscr.clear, stdscr.clrtobot, stdscr.clrtoeol, stdscr.cursyncup, stdscr.delch, stdscr.deleteln, stdscr.erase, stdscr.getbegyx, stdscr.getbkgd, stdscr.getkey, stdscr.getmaxyx, @@ -126,6 +126,13 @@ class TestCurses(unittest.TestCase): win.border(65, 66, 67, 68, 69, [], 71, 72) + win.box(65, 67) + win.box('!', '_') + win.box(b':', b'~') + self.assertRaises(TypeError, win.box, 65, 66, 67) + self.assertRaises(TypeError, win.box, 65) + win.box() + stdscr.clearok(1) win4 = stdscr.derwin(2,2) |