Skip to content

Commit

Permalink
[ruby/reline] Add a test for rerendering arg prompt after pasting
Browse files Browse the repository at this point in the history
  • Loading branch information
aycabta authored and matzbot committed Oct 3, 2021
1 parent 95522ef commit d31279f
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/reline/yamatanooroti/test_rendering.rb
Expand Up @@ -1067,6 +1067,17 @@ def test_dialog_callback_returns_nil
EOC
end

def test_rerender_argument_prompt_after_pasting
start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.')
write('abcdef')
write("\M-3\C-h")
close
assert_screen(<<~'EOC')
Multiline REPL.
prompt> abc
EOC
end

def write_inputrc(content)
File.open(@inputrc_file, 'w') do |f|
f.write content
Expand Down

0 comments on commit d31279f

Please sign in to comment.