1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

[ruby/reline] Add a test that dialog may appear at the top if cursor at bottom edge

https://github.com/ruby/reline/commit/6c2ab47958
This commit is contained in:
aycabta 2021-09-10 06:57:41 +09:00 committed by git
parent c00643c18a
commit 963e2c33b6

View file

@ -873,6 +873,27 @@ begin
EOC
end
def test_autocomplete_at_bottom
start_terminal(15, 50, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
write('def hoge' + "\C-m" * 10 + "end\C-p ")
write('S')
close
assert_screen(<<~'EOC')
Multiline REPL.
prompt> def hoge
prompt>
prompt>
prompt> String
prompt> Struct
prompt> Symbol
prompt> ScriptError
prompt> SyntaxError
prompt> Signal
prompt> S
prompt> end
EOC
end
def test_simple_dialog_with_scroll_key
start_terminal(20, 50, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --dialog long,scrollkey}, startup_message: 'Multiline REPL.')
write('a')