From 8711f77a26078b80eb954e0bc873418cf733eff5 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Sun, 28 Apr 2019 20:33:12 +0900 Subject: make sync-default-gems GEM=irb from https://github.com/ruby/irb/commit/96f05e726879e9858eb015c8d043c9f52b864ff9. Just syncing newer test changes so that conflicts do not happen when trunk is modified and we need to backport that to ruby/irb. --- test/irb/test_color.rb | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'test/irb') diff --git a/test/irb/test_color.rb b/test/irb/test_color.rb index 5a2044836a..e6186efed2 100644 --- a/test/irb/test_color.rb +++ b/test/irb/test_color.rb @@ -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 -- cgit v1.2.3