Files
babi/tests/current_position_test.py
Anthony Sottile 230e457e79 split up the tests
2019-12-14 13:31:08 -08:00

20 lines
574 B
Python

from testing.runner import and_exit
from testing.runner import run
def test_current_position(ten_lines):
with run(str(ten_lines)) as h, and_exit(h):
h.press('^C')
h.await_text('line 1, col 1 (of 10 lines)')
h.press('Right')
h.press('^C')
h.await_text('line 1, col 2 (of 10 lines)')
h.press('Down')
h.press('^C')
h.await_text('line 2, col 2 (of 10 lines)')
h.press('Up')
for i in range(10):
h.press('^K')
h.press('^C')
h.await_text('line 1, col 1 (of 1 line)')