mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Use LineEditor#reset on test
This commit is contained in:
parent
d3a702a3f1
commit
33bce2585f
2 changed files with 4 additions and 6 deletions
|
@ -4,9 +4,8 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase
|
||||||
def setup
|
def setup
|
||||||
@prompt = '> '
|
@prompt = '> '
|
||||||
@config = Reline::Config.new # Emacs mode is default
|
@config = Reline::Config.new # Emacs mode is default
|
||||||
@line_editor = Reline::LineEditor.new(
|
@line_editor = Reline::LineEditor.new(@config)
|
||||||
@config, @prompt,
|
@line_editor.reset(@prompt, (RELINE_TEST_ENCODING rescue Encoding.default_external))
|
||||||
(RELINE_TEST_ENCODING rescue Encoding.default_external))
|
|
||||||
@line_editor.retrieve_completion_block = Reline.method(:retrieve_completion_block)
|
@line_editor.retrieve_completion_block = Reline.method(:retrieve_completion_block)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -7,9 +7,8 @@ class Reline::KeyActor::ViInsert::Test < Reline::TestCase
|
||||||
@config.read_lines(<<~LINES.split(/(?<=\n)/))
|
@config.read_lines(<<~LINES.split(/(?<=\n)/))
|
||||||
set editing-mode vi
|
set editing-mode vi
|
||||||
LINES
|
LINES
|
||||||
@line_editor = Reline::LineEditor.new(
|
@line_editor = Reline::LineEditor.new(@config)
|
||||||
@config, @prompt,
|
@line_editor.reset(@prompt, (RELINE_TEST_ENCODING rescue Encoding.default_external))
|
||||||
(RELINE_TEST_ENCODING rescue Encoding.default_external))
|
|
||||||
@line_editor.retrieve_completion_block = Reline.method(:retrieve_completion_block)
|
@line_editor.retrieve_completion_block = Reline.method(:retrieve_completion_block)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue