[ruby/irb] Fix Test timedout in test_debug_cmd

(https://github.com/ruby/irb/pull/582)

* 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
This commit is contained in:
tomoya ishida 2023-05-17 13:42:21 +09:00 коммит произвёл git
Родитель 4d1ca2e1f9
Коммит 264ba0f89a
1 изменённых файлов: 5 добавлений и 2 удалений

Просмотреть файл

@ -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
@ -211,7 +211,10 @@ module TestIRB
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 = []