summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-09-27 03:58:19 +0900
committeraycabta <aycabta@gmail.com>2021-12-24 18:23:28 +0900
commit6c3cc9c58ab95e963d6255d719e2248cafef7b49 (patch)
tree7233252a1c830a62430477c3b095abcfd038bc72 /test
parentfd60a235f5feeb2fa63d8e9ebb54e2236c16ce90 (diff)
[ruby/reline] Rename the wrong name "em-kill-line" with the correct name "unix-line-discard"
https://github.com/ruby/reline/commit/da7af35d1f
Diffstat (limited to 'test')
-rw-r--r--test/reline/test_key_actor_vi.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/reline/test_key_actor_vi.rb b/test/reline/test_key_actor_vi.rb
index 722cdc0b75..b3d49c9bbb 100644
--- a/test/reline/test_key_actor_vi.rb
+++ b/test/reline/test_key_actor_vi.rb
@@ -1426,4 +1426,32 @@ class Reline::KeyActor::ViInsert::Test < Reline::TestCase
assert_cursor(4)
assert_cursor_max(4)
end
+
+ def test_vi_kill_line_prev
+ input_keys("\C-u", false)
+ assert_byte_pointer_size('')
+ assert_cursor(0)
+ assert_cursor_max(0)
+ assert_line('')
+ input_keys('abc')
+ assert_byte_pointer_size('abc')
+ assert_cursor(3)
+ assert_cursor_max(3)
+ input_keys("\C-u", false)
+ assert_byte_pointer_size('')
+ assert_cursor(0)
+ assert_cursor_max(0)
+ assert_line('')
+ input_keys('abc')
+ input_keys("\C-[\C-u", false)
+ assert_byte_pointer_size('')
+ assert_cursor(0)
+ assert_cursor_max(1)
+ assert_line('c')
+ input_keys("\C-u", false)
+ assert_byte_pointer_size('')
+ assert_cursor(0)
+ assert_cursor_max(1)
+ assert_line('c')
+ end
end