summaryrefslogtreecommitdiff
path: root/test/irb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-04-26 01:43:11 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-04-26 01:43:14 +0900
commit0408b8b390f788693b10ad82281ae3d66ea52eb4 (patch)
treec2ae3cb62bbea65df9f254b1477f6ee058e7b808 /test/irb
parent2422316aea034c818734ad2fa68c4b021a6aafeb (diff)
Syntax-highlight yield in IRB
Diffstat (limited to 'test/irb')
-rw-r--r--test/irb/test_color.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/irb/test_color.rb b/test/irb/test_color.rb
index 601b7a2d34..4b1878545e 100644
--- a/test/irb/test_color.rb
+++ b/test/irb/test_color.rb
@@ -24,6 +24,7 @@ module TestIRB
'ERB.new("a#{nil}b", trim_mode: "-")' => "#{BLUE}#{BOLD}#{UNDERLINE}ERB#{CLEAR}.new(#{RED}\"#{CLEAR}#{RED}a#{CLEAR}#{RED}\#{#{CLEAR}#{CYAN}#{BOLD}nil#{CLEAR}#{RED}}#{CLEAR}#{RED}b#{CLEAR}#{RED}\"#{CLEAR}, #{MAGENTA}trim_mode:#{CLEAR} #{RED}\"#{CLEAR}#{RED}-#{CLEAR}#{RED}\"#{CLEAR})",
"# comment" => "#{BLUE}#{BOLD}# comment#{CLEAR}",
'/r#{e}g/' => "#{RED}#{BOLD}/#{CLEAR}#{RED}r#{CLEAR}#{RED}\#{#{CLEAR}e}#{RED}g#{CLEAR}#{RED}#{BOLD}/#{CLEAR}",
+ "yield(hello)" => "#{GREEN}yield#{CLEAR}(hello)",
}.each do |code, result|
assert_equal(result, with_term { IRB::Color.colorize_code(code) })
end