summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-09-27 04:24:06 +0900
committeraycabta <aycabta@gmail.com>2021-12-24 18:23:28 +0900
commitbad1e153d485cf7b68981a78e78e23c3f118c5a8 (patch)
tree69751bc2471c7c492b597e9053be5c176d152e1c /test
parent6c3cc9c58ab95e963d6255d719e2248cafef7b49 (diff)
[ruby/reline] Implement em_kill_line
https://github.com/ruby/reline/commit/9fca6ceb45
Diffstat (limited to 'test')
-rw-r--r--test/reline/test_key_actor_emacs.rb28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/reline/test_key_actor_emacs.rb b/test/reline/test_key_actor_emacs.rb
index a9033a85b5..a5fdf247c8 100644
--- a/test/reline/test_key_actor_emacs.rb
+++ b/test/reline/test_key_actor_emacs.rb
@@ -254,6 +254,34 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase
assert_line('ab')
end
+ def test_em_kill_line
+ @line_editor.input_key(Reline::Key.new(:em_kill_line, :em_kill_line, false))
+ assert_byte_pointer_size('')
+ assert_cursor(0)
+ assert_cursor_max(0)
+ assert_line('')
+ input_keys('abc')
+ @line_editor.input_key(Reline::Key.new(:em_kill_line, :em_kill_line, false))
+ assert_byte_pointer_size('')
+ assert_cursor(0)
+ assert_cursor_max(0)
+ assert_line('')
+ input_keys('abc')
+ input_keys("\C-b", false)
+ @line_editor.input_key(Reline::Key.new(:em_kill_line, :em_kill_line, false))
+ assert_byte_pointer_size('')
+ assert_cursor(0)
+ assert_cursor_max(0)
+ assert_line('')
+ input_keys('abc')
+ input_keys("\C-a", false)
+ @line_editor.input_key(Reline::Key.new(:em_kill_line, :em_kill_line, false))
+ assert_byte_pointer_size('')
+ assert_cursor(0)
+ assert_cursor_max(0)
+ assert_line('')
+ end
+
def test_ed_move_to_beg
input_keys('abd')
assert_byte_pointer_size('abd')