about summary refs log tree commit diff stats
path: root/text_tests.lua
diff options
context:
space:
mode:
Diffstat (limited to 'text_tests.lua')
-rw-r--r--text_tests.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/text_tests.lua b/text_tests.lua
index 1d508bc..49c737d 100644
--- a/text_tests.lua
+++ b/text_tests.lua
@@ -152,6 +152,17 @@ function test_skip_past_tab_to_previous_word()
   check_eq(Cursor1.pos, 9, 'F - test_skip_past_tab_to_previous_word')
 end
 
+function test_skip_multiple_spaces_to_previous_word()
+  io.write('\ntest_skip_multiple_spaces_to_previous_word')
+  App.screen.init{width=120, height=60}
+  Lines = load_array{'abc  def'}
+  Cursor1 = {line=1, pos=6}  -- at the start of second word
+  Margin_right = 0; Margin_width = Margin_left
+  App.draw()
+  App.run_after_keychord('M-left')
+  check_eq(Cursor1.pos, 1, 'F - test_skip_multiple_spaces_to_previous_word')
+end
+
 function test_move_to_start_of_word_on_previous_line()
   io.write('\ntest_move_to_start_of_word_on_previous_line')
   App.screen.init{width=120, height=60}
@@ -197,6 +208,17 @@ function test_skip_past_tab_to_next_word()
   check_eq(Cursor1.pos, 4, 'F - test_skip_past_tab_to_next_word')
 end
 
+function test_skip_multiple_spaces_to_next_word()
+  io.write('\ntest_skip_multiple_spaces_to_next_word')
+  App.screen.init{width=120, height=60}
+  Lines = load_array{'abc  def'}
+  Cursor1 = {line=1, pos=4}  -- at the start of second word
+  Margin_right = 0; Margin_width = Margin_left
+  App.draw()
+  App.run_after_keychord('M-right')
+  check_eq(Cursor1.pos, 9, 'F - test_skip_multiple_spaces_to_next_word')
+end
+
 function test_move_past_end_of_word_on_next_line()
   io.write('\ntest_move_past_end_of_word_on_next_line')
   App.screen.init{width=120, height=60}