Fixed crash bug. Wide characters were sometimes causing an index out of range error. Now they are just treated as spaces.
This commit is contained in:
@@ -39,6 +39,26 @@ def test_private_sgr_sequence_from_fullscreen_apps_does_not_crash():
|
||||
assert screen["text"].splitlines()[0] == "X "
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_overwritten_wide_character_stub_renders_as_space():
|
||||
terminal = Terminal(4, 1, DummyProcessInput())
|
||||
|
||||
terminal.feed("界\rX".encode())
|
||||
screen = terminal.get_screen_content()
|
||||
|
||||
assert screen["text"] == "X "
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_wide_character_and_stub_keep_terminal_width():
|
||||
terminal = Terminal(4, 1, DummyProcessInput())
|
||||
|
||||
terminal.feed("界".encode())
|
||||
screen = terminal.get_screen_content()
|
||||
|
||||
assert screen["text"] == "界 "
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
def test_optional_float_setting_uses_default_when_missing():
|
||||
settings_manager = type(
|
||||
|
||||
Reference in New Issue
Block a user