File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -939,6 +939,22 @@ def test_continuous_completion_disabled_with_perfect_match
939939 assert_line_around_cursor ( 'foo' , '' )
940940 end
941941
942+ def test_completion_append_character
943+ @line_editor . completion_proc = proc { |word |
944+ %w[ foo_ foo_foo foo_bar ] . select { |s | s . start_with? word }
945+ }
946+ @line_editor . completion_append_character = 'X'
947+ input_keys ( 'f' )
948+ input_keys ( "\C -i" , false )
949+ assert_line_around_cursor ( 'foo_' , '' )
950+ input_keys ( 'f' )
951+ input_keys ( "\C -i" , false )
952+ assert_line_around_cursor ( 'foo_fooX' , '' )
953+ input_keys ( ' foo_bar' )
954+ input_keys ( "\C -i" , false )
955+ assert_line_around_cursor ( 'foo_fooX foo_barX' , '' )
956+ end
957+
942958 def test_completion_with_completion_ignore_case
943959 @line_editor . completion_proc = proc { |word |
944960 %w{
You can’t perform that action at this time.
0 commit comments