diff options
author | aycabta <aycabta@gmail.com> | 2020-11-08 21:56:27 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2020-12-05 02:58:58 +0900 |
commit | 9750c27afc99034960b74e8951718ca07cc353a8 (patch) | |
tree | ae96e40e00356d2c0f459e9aace599fe5be63996 /test/reline/test_key_actor_vi.rb | |
parent | ba8e5f77eb2562cc0605f1414426a34c7e844964 (diff) | |
download | ruby-9750c27afc99034960b74e8951718ca07cc353a8.tar.gz |
[ruby/reline] Call process_insert when the end of pasting plural fullwidth chars
https://github.com/ruby/reline/commit/594484d9f9
Diffstat (limited to 'test/reline/test_key_actor_vi.rb')
-rw-r--r-- | test/reline/test_key_actor_vi.rb | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/test/reline/test_key_actor_vi.rb b/test/reline/test_key_actor_vi.rb index 7c0eea1fa1..fb7c8042ea 100644 --- a/test/reline/test_key_actor_vi.rb +++ b/test/reline/test_key_actor_vi.rb @@ -1353,4 +1353,26 @@ class Reline::KeyActor::ViInsert::Test < Reline::TestCase assert_cursor(0) assert_cursor_max(3) end + + def test_pasting + start_pasting + input_keys('ab') + finish_pasting + input_keys('c') + assert_line('abc') + assert_byte_pointer_size('abc') + assert_cursor(3) + assert_cursor_max(3) + end + + def test_pasting_fullwidth + start_pasting + input_keys('あ') + finish_pasting + input_keys('い') + assert_line('あい') + assert_byte_pointer_size('あい') + assert_cursor(4) + assert_cursor_max(4) + end end |