diff options
-rw-r--r-- | source_text_tests.lua | 13 | ||||
-rw-r--r-- | text_tests.lua | 13 |
2 files changed, 20 insertions, 6 deletions
diff --git a/source_text_tests.lua b/source_text_tests.lua index 2dc3adb..0b45232 100644 --- a/source_text_tests.lua +++ b/source_text_tests.lua @@ -1086,7 +1086,14 @@ function test_pagedown_can_start_from_middle_of_long_wrapping_line() y = y + Editor_state.line_height App.screen.check(y, 'jkl ', 'screen:2') y = y + Editor_state.line_height - App.screen.check(y, 'mn', 'screen:3') + if Version == '12.0' then + -- HACK: Maybe v12.0 uses a different font? Strange that it only causes + -- issues in a couple of places. + -- We'll need to rethink our tests if issues like this start to multiply. + App.screen.check(y, 'mno ', 'screen:3') + else + App.screen.check(y, 'mn', 'screen:3') + end end function test_pagedown_never_moves_up() @@ -1796,10 +1803,10 @@ function test_position_cursor_on_recently_edited_wrapping_line() y = y + Editor_state.line_height App.screen.check(y, 'stu', 'baseline2/screen:3') -- try to move the cursor earlier in the third screen line by clicking the mouse - edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+Editor_state.line_height*2+5, 1) + edit.run_after_mouse_release(Editor_state, Editor_state.left+2,Editor_state.top+Editor_state.line_height*2+5, 1) -- cursor should move check_eq(Editor_state.cursor1.line, 1, 'cursor:line') - check_eq(Editor_state.cursor1.pos, 26, 'cursor:pos') + check_eq(Editor_state.cursor1.pos, 25, 'cursor:pos') end function test_backspace_can_scroll_up() diff --git a/text_tests.lua b/text_tests.lua index bee6c31..41fe2df 100644 --- a/text_tests.lua +++ b/text_tests.lua @@ -1116,7 +1116,14 @@ function test_pagedown_can_start_from_middle_of_long_wrapping_line() y = y + Editor_state.line_height App.screen.check(y, 'jkl ', 'screen:2') y = y + Editor_state.line_height - App.screen.check(y, 'mn', 'screen:3') + if Version == '12.0' then + -- HACK: Maybe v12.0 uses a different font? Strange that it only causes + -- issues in a couple of places. + -- We'll need to rethink our tests if issues like this start to multiply. + App.screen.check(y, 'mno ', 'screen:3') + else + App.screen.check(y, 'mn', 'screen:3') + end end function test_pagedown_never_moves_up() @@ -1826,10 +1833,10 @@ function test_position_cursor_on_recently_edited_wrapping_line() y = y + Editor_state.line_height App.screen.check(y, 'stu', 'baseline2/screen:3') -- try to move the cursor earlier in the third screen line by clicking the mouse - edit.run_after_mouse_release(Editor_state, Editor_state.left+8,Editor_state.top+Editor_state.line_height*2+5, 1) + edit.run_after_mouse_release(Editor_state, Editor_state.left+2,Editor_state.top+Editor_state.line_height*2+5, 1) -- cursor should move check_eq(Editor_state.cursor1.line, 1, 'cursor:line') - check_eq(Editor_state.cursor1.pos, 26, 'cursor:pos') + check_eq(Editor_state.cursor1.pos, 25, 'cursor:pos') end function test_backspace_can_scroll_up() |