mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 13:34:48 +02:00
Basic tests for HistoryBuf
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
|
||||
from unittest import TestCase
|
||||
|
||||
from kitty.fast_data_types import LineBuf, Cursor, Screen
|
||||
from kitty.fast_data_types import LineBuf, Cursor, Screen, HistoryBuf
|
||||
|
||||
|
||||
def filled_line_buf(ynum=5, xnum=5, cursor=Cursor()):
|
||||
@@ -25,6 +25,14 @@ def filled_cursor():
|
||||
return ans
|
||||
|
||||
|
||||
def filled_history_buf(ynum=5, xnum=5, cursor=Cursor()):
|
||||
lb = filled_line_buf(ynum, xnum, cursor)
|
||||
ans = HistoryBuf(ynum, xnum)
|
||||
for i in range(ynum):
|
||||
ans.push(lb.line(i))
|
||||
return ans
|
||||
|
||||
|
||||
class BaseTest(TestCase):
|
||||
|
||||
ae = TestCase.assertEqual
|
||||
|
||||
Reference in New Issue
Block a user