Add a test that exercises the text_cache in Line code path

This commit is contained in:
Kovid Goyal
2024-11-12 09:16:45 +05:30
parent 6f5789fcd0
commit 6d5a2b8ecd

View File

@@ -691,8 +691,8 @@ class TestScreen(BaseTest):
def test_wrapping_serialization(self):
from kitty.window import as_text
s = self.create_screen(cols=2, lines=2, scrollback=2, options={'scrollback_pager_history_size': 128})
s.draw('aabbccddeeff')
self.ae(as_text(s, add_history=True), 'aabbccddeeff')
s.draw('äabbccddeefü')
self.ae(as_text(s, add_history=True), 'äabbccddeefü')
self.assertNotIn('\n', as_text(s, add_history=True, as_ansi=True))
s = self.create_screen(cols=2, lines=2, scrollback=2, options={'scrollback_pager_history_size': 128})