diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2022-07-16 08:27:11 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2022-07-16 08:27:11 -0700 |
commit | a2b654b5349c69c3404014cecdd24b7035069f68 (patch) | |
tree | 34257f4d3437afbd915a598f0ff63b53ab496b01 | |
parent | 51b4efa59ac1db5636794a7f4f53296744d199c8 (diff) | |
download | view.love-a2b654b5349c69c3404014cecdd24b7035069f68.tar.gz |
more decoupling editor tests from App
-rw-r--r-- | text_tests.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/text_tests.lua b/text_tests.lua index beed441..c11f396 100644 --- a/text_tests.lua +++ b/text_tests.lua @@ -478,7 +478,7 @@ function test_select_text() App.fake_key_press('lshift') edit.run_after_keychord(Editor_state, 'S-right') App.fake_key_release('lshift') - App.keyreleased('lshift') + edit.key_released(Editor_state, 'lshift') -- selection persists even after shift is released check_eq(Editor_state.selection1.line, 1, 'F - test_select_text/selection:line') check_eq(Editor_state.selection1.pos, 1, 'F - test_select_text/selection:pos') @@ -534,9 +534,9 @@ function test_edit_with_shift_key_deletes_selection() edit.draw(Editor_state) -- mimic precise keypresses for a capital letter App.fake_key_press('lshift') - App.keypressed('d') + edit.keychord_pressed(Editor_state, 'd', 'd') App.textinput('D') - App.keyreleased('d') + edit.key_released(Editor_state, 'd') App.fake_key_release('lshift') -- selected text is deleted and replaced with the key check_nil(Editor_state.selection1.line, 'F - test_edit_with_shift_key_deletes_selection') |