diff options
author | aycabta <aycabta@gmail.com> | 2020-12-23 21:19:27 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2020-12-23 21:26:25 +0900 |
commit | 129ecb43e54b3249734c69787f813d49ce995567 (patch) | |
tree | bdcd2b80e4098a1c034fc27b4240a0e7c873024c | |
parent | 31bd17218515a20cf46951018d413b739935beba (diff) | |
download | ruby-129ecb43e54b3249734c69787f813d49ce995567.tar.gz |
[ruby/irb] Fix error_message for assert_dynamic_prompt
https://github.com/ruby/irb/commit/b12dfb6298
-rw-r--r-- | test/irb/test_ruby_lex.rb | 10 |
1 files changed, 8 insertions, 2 deletions
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 ? '*' : '>'] |