diff options
author | aycabta <aycabta@gmail.com> | 2019-05-21 17:46:31 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2019-05-21 17:46:41 +0900 |
commit | 6d93baaedd0e9819d4ddb6637b2d3d539f1fa210 (patch) | |
tree | a77b588bf49957a1c8f069740801443e97d20b66 /test | |
parent | 8c004c71235c5ee8b2d4846672788d3089f3e884 (diff) | |
download | ruby-6d93baaedd0e9819d4ddb6637b2d3d539f1fa210.tar.gz |
Support DEL key
Diffstat (limited to 'test')
-rw-r--r-- | test/reline/test_key_actor_emacs.rb | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/reline/test_key_actor_emacs.rb b/test/reline/test_key_actor_emacs.rb index 535906ea24..11ae53b971 100644 --- a/test/reline/test_key_actor_emacs.rb +++ b/test/reline/test_key_actor_emacs.rb @@ -1180,4 +1180,29 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase assert_cursor(0) assert_cursor_max(3) end + +=begin # TODO: move KeyStroke instance from Reline to LineEditor + def test_key_delete + input_keys('ab') + assert_byte_pointer_size('ab') + assert_cursor(2) + assert_cursor_max(2) + assert_line('ab') + [27, 91, 51, 126].each do |key| + @line_editor.input_key(key) + end + assert_byte_pointer_size('ab') + assert_cursor(2) + assert_cursor_max(2) + assert_line('ab') + input_keys("\C-b") + [27, 91, 51, 126].each do |key| + @line_editor.input_key(key) + end + assert_byte_pointer_size('a') + assert_cursor(1) + assert_cursor_max(1) + assert_line('a') + end +=end end |