Add test_completion_with_indent_and_completer_quote_characters
This is for 8a705245e55575d4d310a2e956b89a36a5931971.
This commit is contained in:
parent
778634f778
commit
4db898284d
@ -1325,6 +1325,37 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase
|
|||||||
assert_line('foo_ba')
|
assert_line('foo_ba')
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_completion_with_indent_and_completer_quote_characters
|
||||||
|
@line_editor.completion_proc = proc { |word|
|
||||||
|
%w{
|
||||||
|
"".foo_foo
|
||||||
|
"".foo_bar
|
||||||
|
"".foo_baz
|
||||||
|
"".qux
|
||||||
|
}.map { |i|
|
||||||
|
i.encode(@encoding)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
input_keys(' "".foo_')
|
||||||
|
assert_byte_pointer_size(' "".foo_')
|
||||||
|
assert_cursor(9)
|
||||||
|
assert_cursor_max(9)
|
||||||
|
assert_line(' "".foo_')
|
||||||
|
assert_equal(nil, @line_editor.instance_variable_get(:@menu_info))
|
||||||
|
input_keys("\C-i", false)
|
||||||
|
assert_byte_pointer_size(' "".foo_')
|
||||||
|
assert_cursor(9)
|
||||||
|
assert_cursor_max(9)
|
||||||
|
assert_line(' "".foo_')
|
||||||
|
assert_equal(nil, @line_editor.instance_variable_get(:@menu_info))
|
||||||
|
input_keys("\C-i", false)
|
||||||
|
assert_byte_pointer_size(' "".foo_')
|
||||||
|
assert_cursor(9)
|
||||||
|
assert_cursor_max(9)
|
||||||
|
assert_line(' "".foo_')
|
||||||
|
assert_equal(%w{"".foo_foo "".foo_bar "".foo_baz}, @line_editor.instance_variable_get(:@menu_info).list)
|
||||||
|
end
|
||||||
|
|
||||||
def test_completion_with_perfect_match
|
def test_completion_with_perfect_match
|
||||||
@line_editor.completion_proc = proc { |word|
|
@line_editor.completion_proc = proc { |word|
|
||||||
%w{
|
%w{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user