diff --git a/test/reline/test_key_actor_emacs.rb b/test/reline/test_key_actor_emacs.rb index 2a25c48941..a7e60a509b 100644 --- a/test/reline/test_key_actor_emacs.rb +++ b/test/reline/test_key_actor_emacs.rb @@ -939,6 +939,22 @@ def test_continuous_completion_disabled_with_perfect_match assert_line_around_cursor('foo', '') end + def test_completion_append_character + @line_editor.completion_proc = proc { |word| + %w[foo_ foo_foo foo_bar].select { |s| s.start_with? word } + } + @line_editor.completion_append_character = 'X' + input_keys('f') + input_keys("\C-i", false) + assert_line_around_cursor('foo_', '') + input_keys('f') + input_keys("\C-i", false) + assert_line_around_cursor('foo_fooX', '') + input_keys(' foo_bar') + input_keys("\C-i", false) + assert_line_around_cursor('foo_fooX foo_barX', '') + end + def test_completion_with_completion_ignore_case @line_editor.completion_proc = proc { |word| %w{