summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-09-10 07:57:53 +0900
committergit <svn-admin@ruby-lang.org>2021-09-10 09:05:45 +0900
commit9066496aa33b0b74f664cfddfbc9fc307225acb6 (patch)
tree05499a0a4f58cc5f4b7099f0745ebf8a95fc289e /test
parent8e6ed5d75b24ddf5249e877cdc32171ef2140140 (diff)
[ruby/reline] Add a test that autocomplete dialog doesn't crash when empty
https://github.com/ruby/reline/commit/9c0080c27f
Diffstat (limited to 'test')
-rw-r--r--test/reline/yamatanooroti/test_rendering.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb
index 06d59c25ce..29a52688a2 100644
--- a/test/reline/yamatanooroti/test_rendering.rb
+++ b/test/reline/yamatanooroti/test_rendering.rb
@@ -924,6 +924,16 @@ begin
EOC
end
+ def test_autocomplete_empty
+ start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
+ write('Street')
+ close
+ assert_screen(<<~'EOC')
+ Multiline REPL.
+ prompt> Street
+ EOC
+ end
+
def test_autocomplete
start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
write("Str")