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
 | 
			
		||||
    @prompt = '> '
 | 
			
		||||
    @config = Reline::Config.new # Emacs mode is default
 | 
			
		||||
    @line_editor = Reline::LineEditor.new(
 | 
			
		||||
      @config, @prompt,
 | 
			
		||||
      (RELINE_TEST_ENCODING rescue Encoding.default_external))
 | 
			
		||||
    @line_editor = Reline::LineEditor.new(@config)
 | 
			
		||||
    @line_editor.reset(@prompt, (RELINE_TEST_ENCODING rescue Encoding.default_external))
 | 
			
		||||
    @line_editor.retrieve_completion_block = Reline.method(:retrieve_completion_block)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -7,9 +7,8 @@ class Reline::KeyActor::ViInsert::Test < Reline::TestCase
 | 
			
		|||
    @config.read_lines(<<~LINES.split(/(?<=\n)/))
 | 
			
		||||
      set editing-mode vi
 | 
			
		||||
    LINES
 | 
			
		||||
    @line_editor = Reline::LineEditor.new(
 | 
			
		||||
      @config, @prompt,
 | 
			
		||||
      (RELINE_TEST_ENCODING rescue Encoding.default_external))
 | 
			
		||||
    @line_editor = Reline::LineEditor.new(@config)
 | 
			
		||||
    @line_editor.reset(@prompt, (RELINE_TEST_ENCODING rescue Encoding.default_external))
 | 
			
		||||
    @line_editor.retrieve_completion_block = Reline.method(:retrieve_completion_block)
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue