aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-01-09 02:13:23 +0900
committeraycabta <aycabta@gmail.com>2021-01-13 01:12:54 +0900
commiteb5a094fc0231ccff080021aef23b19271761da1 (patch)
tree8395399a4907f4937dc9c6f88394421c7b3b2c24 /test
parent44817db28bfc9a426732977893229e018687919d (diff)
downloadruby-eb5a094fc0231ccff080021aef23b19271761da1.tar.gz
[ruby/reline] Move the cursor correctly when deleting at eol
This fixes ruby/reline#246. https://github.com/ruby/reline/commit/07a73ba601
Diffstat (limited to 'test')
-rw-r--r--test/reline/test_key_actor_vi.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/reline/test_key_actor_vi.rb b/test/reline/test_key_actor_vi.rb
index 6ac776fd9d..c6cd5eff48 100644
--- a/test/reline/test_key_actor_vi.rb
+++ b/test/reline/test_key_actor_vi.rb
@@ -1434,4 +1434,22 @@ class Reline::KeyActor::ViInsert::Test < Reline::TestCase
assert_cursor(4)
assert_cursor_max(4)
end
+
+ def test_ed_delete_next_char_at_eol
+ input_keys('"あ"')
+ assert_line('"あ"')
+ assert_byte_pointer_size('"あ"')
+ assert_cursor(4)
+ assert_cursor_max(4)
+ input_keys("\C-[")
+ assert_line('"あ"')
+ assert_byte_pointer_size('"あ')
+ assert_cursor(3)
+ assert_cursor_max(4)
+ input_keys('xa"')
+ assert_line('"あ"')
+ assert_byte_pointer_size('"あ"')
+ assert_cursor(4)
+ assert_cursor_max(4)
+ end
end