ruby-changes:56094
From: Nobuyoshi <ko1@a...>
Date: Wed, 12 Jun 2019 15:30:27 +0900 (JST)
Subject: [ruby-changes:56094] Nobuyoshi Nakada: 88411d350e (trunk): Another incomplete string case
https://git.ruby-lang.org/ruby.git/commit/?id=88411d350e From 88411d350e9e3eb6425375238a20af9b6aae28ae Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 12 Jun 2019 15:30:07 +0900 Subject: Another incomplete string case diff --git a/test/irb/test_color.rb b/test/irb/test_color.rb index 644f372..6af2e24 100644 --- a/test/irb/test_color.rb +++ b/test/irb/test_color.rb @@ -82,6 +82,7 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_color.rb#L82 # `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 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_color.rb#L93 # `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)}") -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/