mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/irb] Fix error_message for assert_dynamic_prompt
https://github.com/ruby/irb/commit/b12dfb6298
This commit is contained in:
parent
31bd172185
commit
129ecb43e5
1 changed files with 8 additions and 2 deletions
|
@ -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 ? '*' : '>']
|
||||
|
|
Loading…
Add table
Reference in a new issue