Add a test for going right a word from the end

This commit is contained in:
Dave Pearson
2023-01-29 11:47:16 +00:00
parent d5a99425c0
commit 112c789e3c

View File

@@ -108,4 +108,13 @@ async def test_input_right_word_from_start() -> None:
assert input.cursor_position == expected_at[input.id]
async def test_input_right_word_from_home() -> None:
"""Going right one word from the end should do nothing."""
async with InputTester().run_test() as pilot:
for input in pilot.app.query(Input):
input.action_end()
input.action_cursor_right_word()
assert input.cursor_position == len(input.value)
# TODO: more tests.