diff options
author | tomoya ishida <[email protected]> | 2023-05-17 13:42:21 +0900 |
---|---|---|
committer | git <[email protected]> | 2023-05-17 04:42:32 +0000 |
commit | 264ba0f89a52c6d0d6425da0cdfb12bbd420c619 (patch) | |
tree | 55d1725167f72637ba44fc25b0173b73e3dcfe0e /test | |
parent | 4d1ca2e1f964b6d70de34656a7893c76bd3d669b (diff) |
[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
Diffstat (limited to 'test')
-rw-r--r-- | test/irb/test_debug_cmd.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/irb/test_debug_cmd.rb b/test/irb/test_debug_cmd.rb index 4d1bb6d6b9..80331ea0d4 100644 --- a/test/irb/test_debug_cmd.rb +++ b/test/irb/test_debug_cmd.rb @@ -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 = [] |