Skip to content

Commit f682c74

Browse files
committed
Add a test that autocomplete doesn't crash after 2nd line
1 parent 2c6f604 commit f682c74

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/reline/yamatanooroti/test_rendering.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,19 @@ def test_autocomplete
961961
EOC
962962
end
963963

964+
def test_autocomplete_after_2nd_line
965+
start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
966+
write("def hoge\n Str")
967+
close
968+
assert_screen(<<~'EOC')
969+
Multiline REPL.
970+
prompt> def hoge
971+
prompt> Str
972+
String
973+
Struct
974+
EOC
975+
end
976+
964977
def test_autocomplete_long_with_scrollbar
965978
start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete-long}, startup_message: 'Multiline REPL.')
966979
write('S')

0 commit comments

Comments
 (0)