diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-05-29 22:03:47 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2019-05-29 22:09:54 +0900 |
commit | 5b64d7ac6e7cbf759b859428f125539e58bac0bd (patch) | |
tree | 5e0773f8d47d2cf50824a4f91fb1c21e7cd649a5 /test | |
parent | 12644e8b0208b01f4f4cea550d161a86e6f25aa8 (diff) |
Colorize errors more
* lib/irb/color.rb (IRB::Color.colorize_code): colorize
`compile_error` part as same as `on_parse_error`.
Diffstat (limited to 'test')
-rw-r--r-- | test/irb/test_color.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/irb/test_color.rb b/test/irb/test_color.rb index edca2d7050..778874aef1 100644 --- a/test/irb/test_color.rb +++ b/test/irb/test_color.rb @@ -66,6 +66,7 @@ module TestIRB "\t" => "\t", # not ^I "foo(*%W(bar))" => "foo(*#{RED}%W(#{CLEAR}#{RED}bar#{CLEAR}#{RED})#{CLEAR})", "$stdout" => "#{GREEN}#{BOLD}$stdout#{CLEAR}", + "'foo' + 'bar" => "#{RED}'#{CLEAR}#{RED}foo#{CLEAR}#{RED}'#{CLEAR} + #{RED}'#{CLEAR}#{RED}#{REVERSE}bar#{CLEAR}", }.each do |code, result| actual = with_term { IRB::Color.colorize_code(code) } assert_equal(result, actual, "Case: colorize_code(#{code.dump})\nResult: #{humanized_literal(actual)}") |