diff options
author | aycabta <[email protected]> | 2020-12-18 23:36:33 +0900 |
---|---|---|
committer | aycabta <[email protected]> | 2020-12-19 02:12:11 +0900 |
commit | d4257c6152ac9ad5179eb77d6e68942a5b9c011f (patch) | |
tree | 27b0fe0504f5c696a5c5c0f1d0def2f149e9880d /test | |
parent | af2c81e10c15c267611e59f11b7152545c617826 (diff) |
[ruby/reline] Yank by em-kill-region correctly
This closes ruby/reline#106.
https://github.com/ruby/reline/commit/2549a52e15
Diffstat (limited to 'test')
-rw-r--r-- | test/reline/test_key_actor_emacs.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/reline/test_key_actor_emacs.rb b/test/reline/test_key_actor_emacs.rb index 2ba6a32b93..04c3254c8e 100644 --- a/test/reline/test_key_actor_emacs.rb +++ b/test/reline/test_key_actor_emacs.rb @@ -2185,6 +2185,24 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase assert_line('hoge') end + def test_em_kill_region_with_kill_ring + input_keys("def hoge\C-b\C-b\C-b\C-b", false) + assert_byte_pointer_size('def ') + assert_cursor(4) + assert_cursor_max(8) + assert_line('def hoge') + input_keys("\C-k\C-w", false) + assert_byte_pointer_size('') + assert_cursor(0) + assert_cursor_max(0) + assert_line('') + input_keys("\C-y", false) + assert_byte_pointer_size('def hoge') + assert_cursor(8) + assert_cursor_max(8) + assert_line('def hoge') + end + =begin # TODO: move KeyStroke instance from Reline to LineEditor def test_key_delete input_keys('ab') |