diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2017-11-01 19:23:46 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-11-01 19:23:46 (GMT) |
commit | aad7ac10af6ed40fc21b842e04be0b04b2915d4a (patch) | |
tree | 42bc2d36428ae02c54893876c8c383d57f156f83 /Lib/test | |
parent | 1f81ea85e8e20347ec396001e5b869d36fe38398 (diff) | |
download | cpython-aad7ac10af6ed40fc21b842e04be0b04b2915d4a.zip cpython-aad7ac10af6ed40fc21b842e04be0b04b2915d4a.tar.gz cpython-aad7ac10af6ed40fc21b842e04be0b04b2915d4a.tar.bz2 |
bpo-27666: Fixed stack corruption in curses.box() and curses.ungetmouse(). (GH-4220) (#4221)
(cherry picked from commit 4f469c096628af730b17798d0ebfd8925bfde836)
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) |