Skip to content

Commit

Permalink
Add special env for testing
Browse files Browse the repository at this point in the history
See discussion in ruby#907.
  • Loading branch information
dgutov committed Mar 22, 2024
1 parent f04a184 commit 8b8ad45
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/irb/helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,9 @@ def run_ruby_file(&block)
@envs["XDG_CONFIG_HOME"] ||= tmp_dir
@envs["IRBRC"] = nil unless @envs.key?("IRBRC")

PTY.spawn(@envs.merge("TERM" => "dumb"), *cmd) do |read, write, pid|
envs_for_spawn = @envs.merge('TERM' => 'dumb', 'TEST_IRB_FORCE_INTERACTIVE' => 'true')

PTY.spawn(envs_for_spawn, *cmd) do |read, write, pid|
Timeout.timeout(TIMEOUT_SEC) do
while line = safe_gets(read)
lines << line
Expand Down

0 comments on commit 8b8ad45

Please sign in to comment.