Skip to content

Commit

Permalink
Fix Test timedout in test_debug_cmd (#582)
Browse files Browse the repository at this point in the history
* Suppress Reline::IOGate.cursor_pos writing escape sequence in test_debug_cmd

* Force use Reline::GeneralIO as Reline::IOGate and remove RUBY_DEBUG_NO_RELINE option for debug test
  • Loading branch information
tompng committed May 17, 2023
1 parent 457502a commit d3eed13
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/irb/test_debug_cmd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module TestIRB

class DebugCommandTestCase < TestCase
IRB_AND_DEBUGGER_OPTIONS = {
"RUBY_DEBUG_NO_RELINE" => "true", "NO_COLOR" => "true", "RUBY_DEBUG_HISTORY_FILE" => ''
"NO_COLOR" => "true", "RUBY_DEBUG_HISTORY_FILE" => ''
}

def setup
Expand Down Expand Up @@ -211,7 +211,10 @@ def run_ruby_file(&block)
cmd = [EnvUtil.rubybin, "-I", LIB, @ruby_file.to_path]
tmp_dir = Dir.mktmpdir
rc_file = File.open(File.join(tmp_dir, ".irbrc"), "w+")
rc_file.write("IRB.conf[:USE_SINGLELINE] = true")
rc_file.write(<<~RUBY)
IRB.conf[:USE_SINGLELINE] = true
Reline.const_set(:IOGate, Reline::GeneralIO)
RUBY
rc_file.close

@commands = []
Expand Down

0 comments on commit d3eed13

Please sign in to comment.