[ruby/irb] Suppress colorize on Windows tests
https://github.com/ruby/irb/commit/5be9354cf9
This commit is contained in:
parent
d77a42fbfd
commit
b2d2d25b94
@ -175,7 +175,7 @@ EOF
|
||||
body = (start_pos..end_pos).map do |current_pos|
|
||||
sprintf(fmt, pos == current_pos ? '=>' : '', current_pos + 1, lines[current_pos])
|
||||
end.join("")
|
||||
"\nFrom: #{file} @ line #{pos + 1} :\n\n#{body}#{Color.clear}\n"
|
||||
"\nFrom: #{file} @ line #{pos + 1} :\n\n#{body}#{Color.clear if use_colorize}\n"
|
||||
end
|
||||
|
||||
def IRB.delete_caller
|
||||
|
@ -9,6 +9,7 @@ require 'irb/color'
|
||||
module TestIRB
|
||||
class TestWorkSpace < Test::Unit::TestCase
|
||||
def test_code_around_binding
|
||||
IRB.conf[:USE_COLORIZE] = false
|
||||
Tempfile.create('irb') do |f|
|
||||
code = <<~RUBY
|
||||
# 1
|
||||
@ -33,6 +34,8 @@ module TestIRB
|
||||
|
||||
EOS
|
||||
end
|
||||
ensure
|
||||
IRB.conf.delete(:USE_COLORIZE)
|
||||
end
|
||||
|
||||
def test_code_around_binding_with_existing_unreadable_file
|
||||
@ -52,6 +55,7 @@ module TestIRB
|
||||
end
|
||||
|
||||
def test_code_around_binding_with_script_lines__
|
||||
IRB.conf[:USE_COLORIZE] = false
|
||||
with_script_lines do |script_lines|
|
||||
Tempfile.create('irb') do |f|
|
||||
code = "IRB::WorkSpace.new(binding)\n"
|
||||
@ -67,6 +71,8 @@ module TestIRB
|
||||
EOS
|
||||
end
|
||||
end
|
||||
ensure
|
||||
IRB.conf.delete(:USE_COLORIZE)
|
||||
end
|
||||
|
||||
def test_code_around_binding_on_irb
|
||||
|
Loading…
x
Reference in New Issue
Block a user