summaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-03-06 20:38:57 +0000
committerWalter Dörwald <walter@livinglogic.de>2007-03-06 20:38:57 +0000
commitd391f0855c7996ebe82a2980b068dcad1076817a (patch)
tree706df88b20b7f74938dbaf467f5aa6f26a7b7d3d /Lib
parent40c626159d8da4b241980deb1f356b62a101bd51 (diff)
downloadcpython-git-d391f0855c7996ebe82a2980b068dcad1076817a.tar.gz
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')
-rw-r--r--Lib/test/test_curses.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_curses.py b/Lib/test/test_curses.py
index 4022149310..ff7b39d11f 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()