about summary refs log tree commit diff stats
path: root/text_tests.lua
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2023-10-09 20:55:24 -0700
committerKartik K. Agaram <vc@akkartik.com>2023-10-09 20:55:24 -0700
commitb84cbf6d21fccdad85cb7963dd4689a8b497e729 (patch)
treef1d940f9cde81e58abbcb6420743e993db9b3874 /text_tests.lua
parent3aec915559514e8294f80447fcac9c4b34df9dc4 (diff)
parent69d86cae5ba5672e7020243d0f78f0ea6355fd8f (diff)
downloadtext.love-b84cbf6d21fccdad85cb7963dd4689a8b497e729.tar.gz
Merge lines.love
Diffstat (limited to 'text_tests.lua')
-rw-r--r--text_tests.lua13
1 files changed, 10 insertions, 3 deletions
diff --git a/text_tests.lua b/text_tests.lua
index 86d602b..8c2dc3a 100644
--- a/text_tests.lua
+++ b/text_tests.lua
@@ -1061,7 +1061,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()
@@ -1699,10 +1706,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()