mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
Add a test for going left a word from home
This should result in a NOP.
This commit is contained in:
@@ -69,4 +69,12 @@ async def test_input_left_from_end() -> None:
|
||||
assert input.cursor_position == (len(input.value) - 1 if input.value else 0)
|
||||
|
||||
|
||||
async def test_input_left_word_from_home() -> None:
|
||||
"""Going left one word from the start should do nothing."""
|
||||
async with InputTester().run_test() as pilot:
|
||||
for input in pilot.app.query(Input):
|
||||
input.action_cursor_left_word()
|
||||
assert input.cursor_position == 0
|
||||
|
||||
|
||||
# TODO: more tests.
|
||||
|
||||
Reference in New Issue
Block a user