mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Add a test that autocomplete doesn't crash after 2nd line
https://github.com/ruby/reline/commit/f682c74975
This commit is contained in:
parent
d1498f93ab
commit
a22c04a1d9
1 changed files with 13 additions and 0 deletions
|
@ -961,6 +961,19 @@ begin
|
|||
EOC
|
||||
end
|
||||
|
||||
def test_autocomplete_after_2nd_line
|
||||
start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
|
||||
write("def hoge\n Str")
|
||||
close
|
||||
assert_screen(<<~'EOC')
|
||||
Multiline REPL.
|
||||
prompt> def hoge
|
||||
prompt> Str
|
||||
String
|
||||
Struct
|
||||
EOC
|
||||
end
|
||||
|
||||
def test_autocomplete_long_with_scrollbar
|
||||
start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete-long}, startup_message: 'Multiline REPL.')
|
||||
write('S')
|
||||
|
|
Loading…
Add table
Reference in a new issue