diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-03-06 20:38:57 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-03-06 20:38:57 (GMT) |
commit | d391f0855c7996ebe82a2980b068dcad1076817a (patch) | |
tree | 706df88b20b7f74938dbaf467f5aa6f26a7b7d3d /Lib/test/test_curses.py | |
parent | 40c626159d8da4b241980deb1f356b62a101bd51 (diff) | |
download | cpython-d391f0855c7996ebe82a2980b068dcad1076817a.zip cpython-d391f0855c7996ebe82a2980b068dcad1076817a.tar.gz cpython-d391f0855c7996ebe82a2980b068dcad1076817a.tar.bz2 |
Patch for bug #1633621: if curses.resizeterm() or
curses.resize_term() is called, update _curses.LINES,
_curses.COLS, curses.LINES and curses.COLS.
Diffstat (limited to 'Lib/test/test_curses.py')
-rw-r--r-- | Lib/test/test_curses.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py index 4022149..ff7b39d 100644 --- a/Lib/test/test_curses.py +++ b/Lib/test/test_curses.py @@ -241,12 +241,21 @@ def test_userptr_without_set(stdscr): except curses.panel.error: pass +def test_resize_term(stdscr): + if hasattr(curses, 'resizeterm'): + lines, cols = curses.LINES, curses.COLS + curses.resizeterm(lines - 1, cols + 1) + + if curses.LINES != lines - 1 or curses.COLS != cols + 1: + raise RuntimeError, "Expected resizeterm to update LINES and COLS" + def main(stdscr): curses.savetty() try: module_funcs(stdscr) window_funcs(stdscr) test_userptr_without_set(stdscr) + test_resize_term(stdscr) finally: curses.resetty() |