Skip to content

Commit 9c0080c

Browse files
committed
Add a test that autocomplete dialog doesn't crash when empty
1 parent 25a94d7 commit 9c0080c

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/reline/yamatanooroti/test_rendering.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,16 @@ def test_simple_dialog_with_scroll_key
924924
EOC
925925
end
926926

927+
def test_autocomplete_empty
928+
start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
929+
write('Street')
930+
close
931+
assert_screen(<<~'EOC')
932+
Multiline REPL.
933+
prompt> Street
934+
EOC
935+
end
936+
927937
def test_autocomplete
928938
start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
929939
write("Str")

0 commit comments

Comments
 (0)