mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-18 06:25:13 +02:00
Add test for deleting images after they scroll off
This commit is contained in:
@@ -208,3 +208,19 @@ class TestGraphics(BaseTest):
|
||||
rect_eq(l[1]['dest_rect'], -1, 1, -1 + dx, 1 - dy)
|
||||
self.ae(l[0]['group_count'], 1), self.ae(l[1]['group_count'], 1)
|
||||
self.ae(s.cursor.x, 0), self.ae(s.cursor.y, 1)
|
||||
|
||||
def test_gr_scroll(self):
|
||||
cw, ch = 10, 20
|
||||
s, dx, dy, put_image, put_ref, layers, rect_eq = put_helpers(self, cw, ch)
|
||||
put_image(s, 10, 20) # a one cell image at (0, 0)
|
||||
self.ae(len(layers(s)), 1)
|
||||
for i in range(s.lines):
|
||||
s.index()
|
||||
self.ae(len(layers(s)), 1), self.ae(s.grman.image_count, 1)
|
||||
s.index()
|
||||
self.ae(len(layers(s)), 0), self.ae(s.grman.image_count, 1)
|
||||
for i in range(s.historybuf.ynum - 1):
|
||||
s.index()
|
||||
self.ae(s.grman.image_count, 1)
|
||||
s.index()
|
||||
self.ae(s.grman.image_count, 0)
|
||||
|
||||
Reference in New Issue
Block a user