Skip to content
Permalink
Browse files

Another incomplete string case

  • Loading branch information...
nobu committed Jun 12, 2019
1 parent 9593e76 commit 88411d350e9e3eb6425375238a20af9b6aae28ae
Showing with 2 additions and 0 deletions.
  1. +2 −0 test/irb/test_color.rb
@@ -82,6 +82,7 @@ def test_colorize_code_complete_true
# `complete: true` behaviors. Warn end-of-file.
{
"'foo' + 'bar" => "#{RED}'#{CLEAR}#{RED}foo#{CLEAR}#{RED}'#{CLEAR} + #{RED}'#{CLEAR}#{RED}#{REVERSE}bar#{CLEAR}",
"('foo" => "(#{RED}'#{CLEAR}#{RED}#{REVERSE}foo#{CLEAR}",
}.each do |code, result|
actual = with_term { IRB::Color.colorize_code(code, complete: true) }
assert_equal(result, actual, "Case: colorize_code(#{code.dump}, complete: true)\nResult: #{humanized_literal(actual)}")
@@ -92,6 +93,7 @@ def test_colorize_code_complete_false
# `complete: false` behaviors. Do not warn end-of-file.
{
"'foo' + 'bar" => "#{RED}'#{CLEAR}#{RED}foo#{CLEAR}#{RED}'#{CLEAR} + #{RED}'#{CLEAR}#{RED}bar#{CLEAR}",
"('foo" => "(#{RED}'#{CLEAR}#{RED}foo#{CLEAR}",
}.each do |code, result|
actual = with_term { IRB::Color.colorize_code(code, complete: false) }
assert_equal(result, actual, "Case: colorize_code(#{code.dump}, complete: false)\nResult: #{humanized_literal(actual)}")

0 comments on commit 88411d3

Please sign in to comment.
You can’t perform that action at this time.