Add tests for scrollback_fill_enlarged_window

This commit is contained in:
Eddie Lebow
2021-03-08 23:51:27 -05:00
parent e10919496f
commit b76491ba82
2 changed files with 49 additions and 2 deletions

View File

@@ -91,10 +91,15 @@ class BaseTest(TestCase):
options = Options(merge_configs(defaults._asdict(), final_options))
set_options(options)
def create_screen(self, cols=5, lines=5, scrollback=5, cell_width=10, cell_height=20, options=None):
def create_screen(self, cols=5, lines=5, scrollback=5, cell_width=10, cell_height=20, options=None, content=tuple()):
self.set_options(options)
c = Callbacks()
return Screen(c, lines, cols, scrollback, cell_width, cell_height, 0, c)
s = Screen(c, lines, cols, scrollback, cell_width, cell_height, 0, c)
for content_line in content:
s.draw(content_line)
s.linefeed()
s.carriage_return()
return s
def assertEqualAttributes(self, c1, c2):
x1, y1, c1.x, c1.y = c1.x, c1.y, 0, 0