Menu

[2937f2]: / tests / window.py  Maximize  Restore  History

Download this file

49 lines (36 with data), 1.4 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import joefx
class WindowTests(joefx.JoeTestBase):
def test_showlog_querysave(self):
"""Regression test for #326: joe locks up if you try querysave on the startup log"""
self.startJoe()
self.cmd("showlog,nextw,abort,querysave")
self.joe.flushin()
self.cmd("abort")
self.assertExited()
def test_resize_menu_narrower_doesnt_crash(self):
"""Regression test for #310: Segfault when resizing with ^T menu open"""
self.startup.lines = 25
self.startup.columns = 120
self.startJoe()
# Pull up menu and resize down to 40
self.menu("root")
for i in range(119, 39, -1):
self.joe.resize(i, 25)
self.joe.flushin()
self.writectl("^C")
self.cmd("abort")
self.assertExited()
def test_resize_menu_wider_doesnt_crash(self):
"""Regression test for #310: Segfault when resizing with ^T menu open"""
self.startup.lines = 25
self.startup.columns = 80
self.startJoe()
self.joe.resize(40, 25)
# Pull up menu and resize up to 120
self.menu("root")
for i in range(40, 121):
self.joe.resize(i, 25)
self.joe.flushin()
self.writectl("^C")
self.cmd("abort")
self.assertExited()
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.