summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_curses.py
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2009-09-25 22:23:54 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2009-09-25 22:23:54 (GMT)
commitb49e53ee16eba81fb9548843d24d1cc328f2095a (patch)
treea507805bd930a95bf0798bc6de3d9441f3414179 /Lib/test/test_curses.py
parenta9a7611fb6b1a69d0ab9474da2b9cf9e8b294b54 (diff)
downloadcpython-b49e53ee16eba81fb9548843d24d1cc328f2095a.zip
cpython-b49e53ee16eba81fb9548843d24d1cc328f2095a.tar.gz
cpython-b49e53ee16eba81fb9548843d24d1cc328f2095a.tar.bz2
#6243: fix segfault when keyname() returns a NULL pointer.
Bug noted by Trundle, patched by Trundle and Jerry Chen.
Diffstat (limited to 'Lib/test/test_curses.py')
-rw-r--r--Lib/test/test_curses.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
index 1b3489c..2f7c04c 100644
--- a/Lib/test/test_curses.py
+++ b/Lib/test/test_curses.py
@@ -257,6 +257,10 @@ def test_resize_term(stdscr):
if curses.LINES != lines - 1 or curses.COLS != cols + 1:
raise RuntimeError, "Expected resizeterm to update LINES and COLS"
+def test_issue6243(stdscr):
+ curses.ungetch(1025)
+ stdscr.getkey()
+
def main(stdscr):
curses.savetty()
try:
@@ -264,6 +268,7 @@ def main(stdscr):
window_funcs(stdscr)
test_userptr_without_set(stdscr)
test_resize_term(stdscr)
+ test_issue6243(stdscr)
finally:
curses.resetty()