diff options
author | aycabta <aycabta@gmail.com> | 2020-12-24 22:53:24 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2020-12-24 23:26:22 +0900 |
commit | 9a7647d9eb59c8ed00b0de46fbf26f744a4158c5 (patch) | |
tree | 9a0c79feb8691449eeabe8ed96611ff3fbb82d4c /test | |
parent | 78421319d0401c37497f2b5df7110e92eef9f0e4 (diff) |
[ruby/reline] Doesn't contain terminate spaces by cw
This closes ruby/reline#233.
https://github.com/ruby/reline/commit/4c3f2e2eae
Diffstat (limited to 'test')
-rw-r--r-- | test/reline/test_key_actor_vi.rb | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/test/reline/test_key_actor_vi.rb b/test/reline/test_key_actor_vi.rb index 21f4e89a2d..6ac776fd9d 100644 --- a/test/reline/test_key_actor_vi.rb +++ b/test/reline/test_key_actor_vi.rb @@ -1288,21 +1288,39 @@ class Reline::KeyActor::ViInsert::Test < Reline::TestCase assert_cursor(8) assert_cursor_max(19) assert_line('aaa bbb ccc ddd eee') - input_keys('cwaiueo ') - assert_byte_pointer_size('aaa bbb aiueo ') - assert_cursor(14) + input_keys('cwaiueo') + assert_byte_pointer_size('aaa bbb aiueo') + assert_cursor(13) assert_cursor_max(21) assert_line('aaa bbb aiueo ddd eee') input_keys("\C-[") - assert_byte_pointer_size('aaa bbb aiueo') - assert_cursor(13) + assert_byte_pointer_size('aaa bbb aiue') + assert_cursor(12) assert_cursor_max(21) assert_line('aaa bbb aiueo ddd eee') input_keys('cb') assert_byte_pointer_size('aaa bbb ') assert_cursor(8) - assert_cursor_max(16) - assert_line('aaa bbb ddd eee') + assert_cursor_max(17) + assert_line('aaa bbb o ddd eee') + end + + def test_vi_change_meta_with_vi_next_word + input_keys("foo bar baz\C-[0w") + assert_byte_pointer_size('foo ') + assert_cursor(5) + assert_cursor_max(13) + assert_line('foo bar baz') + input_keys('cwhoge') + assert_byte_pointer_size('foo hoge') + assert_cursor(9) + assert_cursor_max(14) + assert_line('foo hoge baz') + input_keys("\C-[") + assert_byte_pointer_size('foo hog') + assert_cursor(8) + assert_cursor_max(14) + assert_line('foo hoge baz') end def test_unimplemented_vi_command_should_be_no_op |