Improve socket handling for -x spawned fenrir instances.
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import pytest
|
||||
|
||||
from fenrirscreenreader.screenDriver.ptyDriver import Terminal
|
||||
|
||||
|
||||
class DummyProcessInput:
|
||||
def __init__(self):
|
||||
self.data = []
|
||||
|
||||
def write(self, data):
|
||||
self.data.append(data)
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_csi_sequences_with_intermediate_characters_do_not_render_final_byte():
|
||||
terminal = Terminal(10, 3, DummyProcessInput())
|
||||
|
||||
terminal.feed(b"\x1b[2026$p\x1b[2048$pX")
|
||||
screen = terminal.get_screen_content()
|
||||
|
||||
assert screen["text"].splitlines()[0] == "X "
|
||||
assert "p" not in screen["text"]
|
||||
Reference in New Issue
Block a user