mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add test_ed_transpose_words_for_mbchar
This commit is contained in:
parent
6dc0541ed3
commit
eadc06ba16
1 changed files with 42 additions and 0 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue