summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-11-01 18:48:49 (GMT)
committerGitHub <noreply@github.com>2017-11-01 18:48:49 (GMT)
commit4f469c096628af730b17798d0ebfd8925bfde836 (patch)
treea161dd6075c64a45b7f16713a48df39d3c618b76 /Lib/test
parent7e68790f3db75a893d5dd336e6201a63bc70212b (diff)
downloadcpython-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.py9
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)