mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
make sync-default-gems GEM=irb
from 96f05e7268
.
Just syncing newer test changes so that conflicts do not happen when trunk is
modified and we need to backport that to ruby/irb.
This commit is contained in:
parent
588f212c26
commit
8711f77a26
1 changed files with 2 additions and 7 deletions
|
@ -31,13 +31,8 @@ module TestIRB
|
|||
"yield(hello)" => "#{GREEN}yield#{CLEAR}(hello)",
|
||||
'"##@var]"' => "#{RED}\"#{CLEAR}#{RED}##{CLEAR}#{RED}##{CLEAR}@var#{RED}]#{CLEAR}#{RED}\"#{CLEAR}",
|
||||
'"foo#{a} #{b}"' => "#{RED}\"#{CLEAR}#{RED}foo#{CLEAR}#{RED}\#{#{CLEAR}a#{RED}}#{CLEAR}#{RED} #{CLEAR}#{RED}\#{#{CLEAR}b#{RED}}#{CLEAR}#{RED}\"#{CLEAR}",
|
||||
}.merge!(
|
||||
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6.0')
|
||||
{ '/r#{e}g/' => "#{RED}\e[1m/#{CLEAR}#{RED}r#{CLEAR}#{RED}\#{#{CLEAR}e#{RED}}#{CLEAR}#{RED}g#{CLEAR}#{RED}\e[1m/#{CLEAR}" }
|
||||
else
|
||||
{ '/r#{e}g/' => "#{RED}#{BOLD}/#{CLEAR}#{RED}r#{CLEAR}#{RED}\#{#{CLEAR}e#{RED}}#{CLEAR}#{RED}g#{CLEAR}#{RED}#{BOLD}/#{CLEAR}" }
|
||||
end
|
||||
).each do |code, result|
|
||||
'/r#{e}g/' => "#{RED}#{BOLD}/#{CLEAR}#{RED}r#{CLEAR}#{RED}\#{#{CLEAR}e#{RED}}#{CLEAR}#{RED}g#{CLEAR}#{RED}#{BOLD}/#{CLEAR}",
|
||||
}.each do |code, result|
|
||||
assert_equal(result, with_term { IRB::Color.colorize_code(code) }, "Case: colorize_code(#{code.dump})")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue