diff options
author | aycabta <[email protected]> | 2020-12-22 04:38:01 +0900 |
---|---|---|
committer | aycabta <[email protected]> | 2020-12-22 23:45:43 +0900 |
commit | b52bc4a9c29e80e10b7e64dbebd97117916d3982 (patch) | |
tree | cbad7f2d553df7529406be8f138a6c0537473cef /test | |
parent | 294552ca6c38b90a2be257727ce5df69b93a4de7 (diff) |
[ruby/reline] Support isearch-terminators
https://github.com/ruby/reline/commit/a7922da16b
Diffstat (limited to 'test')
-rw-r--r-- | test/reline/test_key_actor_emacs.rb | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/reline/test_key_actor_emacs.rb b/test/reline/test_key_actor_emacs.rb index 04c3254c8e..84233a9bfd 100644 --- a/test/reline/test_key_actor_emacs.rb +++ b/test/reline/test_key_actor_emacs.rb @@ -1894,6 +1894,36 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase assert_cursor_max(0) end + def test_search_history_with_isearch_terminator + @config.read_lines(<<~LINES.split(/(?<=\n)/)) + set isearch-terminators "XYZ" + LINES + Reline::HISTORY.concat([ + '1235', # old + '12aa', + '1234' # new + ]) + assert_line('') + assert_byte_pointer_size('') + assert_cursor(0) + assert_cursor_max(0) + input_keys("\C-r12a") + assert_line('12aa') + assert_byte_pointer_size('') + assert_cursor(0) + assert_cursor_max(0) # doesn't determine yet + input_keys('Y') + assert_line('12aa') + assert_byte_pointer_size('') + assert_cursor(0) + assert_cursor_max(4) + input_keys('x') + assert_line('x12aa') + assert_byte_pointer_size('x') + assert_cursor(1) + assert_cursor_max(5) + end + def test_em_set_mark_and_em_exchange_mark input_keys('aaa bbb ccc ddd') assert_byte_pointer_size('aaa bbb ccc ddd') |