diff options
author | aycabta <aycabta@gmail.com> | 2019-06-06 04:25:16 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-06-06 04:25:16 +0900 |
commit | eadc06ba1664102da07ec08aeca6c3e1eccc4e96 (patch) | |
tree | 200b874ce76720ae291820db3a90eb6ba80c429a | |
parent | 6dc0541ed3c3736fb4c0b270f2c8df1c0dbfba95 (diff) | |
download | ruby-eadc06ba1664102da07ec08aeca6c3e1eccc4e96.tar.gz |
Add test_ed_transpose_words_for_mbchar
-rw-r--r-- | test/reline/test_key_actor_emacs.rb | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/reline/test_key_actor_emacs.rb b/test/reline/test_key_actor_emacs.rb index d79627a8c2..4194659631 100644 --- a/test/reline/test_key_actor_emacs.rb +++ b/test/reline/test_key_actor_emacs.rb @@ -861,6 +861,48 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase assert_cursor_max(12) end + def test_ed_transpose_words_for_mbchar + input_keys('あいう かきく') + assert_line('あいう かきく') + assert_byte_pointer_size('あいう かきく') + assert_cursor(13) + assert_cursor_max(13) + input_keys("\M-t", false) + assert_line('かきく あいう') + assert_byte_pointer_size('かきく あいう') + assert_cursor(13) + assert_cursor_max(13) + input_keys("\C-a\C-k", false) + input_keys(' あいう かきく ') + input_keys("\C-b" * 4, false) + assert_line(' あいう かきく ') + assert_byte_pointer_size(' あいう かき') + assert_cursor(13) + assert_cursor_max(18) + input_keys("\M-t", false) + assert_line(' かきく あいう ') + assert_byte_pointer_size(' かきく あいう') + assert_cursor(15) + assert_cursor_max(18) + input_keys("\C-a\C-k", false) + input_keys(' あいう かきく ') + input_keys("\C-b" * 6, false) + assert_line(' あいう かきく ') + assert_byte_pointer_size(' あいう ') + assert_cursor(9) + assert_cursor_max(18) + input_keys("\M-t", false) + assert_line(' かきく あいう ') + assert_byte_pointer_size(' かきく あいう') + assert_cursor(15) + assert_cursor_max(18) + input_keys("\M-t", false) + assert_line(' あいう かきく') + assert_byte_pointer_size(' あいう かきく') + assert_cursor(18) + assert_cursor_max(18) + end + def test_ed_digit input_keys('0123') assert_byte_pointer_size('0123') |