ruby-changes:64522
From: aycabta <ko1@a...>
Date: Wed, 23 Dec 2020 21:30:02 +0900 (JST)
Subject: [ruby-changes:64522] 129ecb43e5 (master): [ruby/irb] Fix error_message for assert_dynamic_prompt
https://git.ruby-lang.org/ruby.git/commit/?id=129ecb43e5 From 129ecb43e54b3249734c69787f813d49ce995567 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> 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 diff --git a/test/irb/test_ruby_lex.rb b/test/irb/test_ruby_lex.rb index 255a5a1..41b5d49 100644 --- a/test/irb/test_ruby_lex.rb +++ b/test/irb/test_ruby_lex.rb @@ -281,8 +281,14 @@ module TestIRB https://github.com/ruby/ruby/blob/trunk/test/irb/test_ruby_lex.rb#L281 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 v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/