From 129ecb43e54b3249734c69787f813d49ce995567 Mon Sep 17 00:00:00 2001 From: aycabta Date: Wed, 23 Dec 2020 21:19:27 +0900 Subject: [ruby/irb] Fix error_message for assert_dynamic_prompt https://github.com/ruby/irb/commit/b12dfb6298 --- test/irb/test_ruby_lex.rb | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'test/irb') diff --git a/test/irb/test_ruby_lex.rb b/test/irb/test_ruby_lex.rb index 255a5a1a63..41b5d49d1e 100644 --- a/test/irb/test_ruby_lex.rb +++ b/test/irb/test_ruby_lex.rb @@ -281,8 +281,14 @@ module TestIRB skip if RUBY_ENGINE == 'truffleruby' ruby_lex = RubyLex.new() io = MockIO_DynamicPrompt.new(lines) do |prompt_list| - error_message = "Calculated the wrong number of spaces for:\n #{lines.join("\n")}" - assert_equal(expected_prompt_list, prompt_list) + error_message = <<~EOM + Expected dynamic prompt: + #{expected_prompt_list.join("\n")} + + Actual dynamic prompt: + #{prompt_list.join("\n")} + EOM + assert_equal(expected_prompt_list, prompt_list, error_message) end ruby_lex.set_prompt do |ltype, indent, continue, line_no| '%03d:%01d:%1s:%s ' % [line_no, indent, ltype, continue ? '*' : '>'] -- cgit v1.2.3