summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-09-10 06:57:41 +0900
committergit <svn-admin@ruby-lang.org>2021-09-10 09:05:05 +0900
commit963e2c33b66c6fabcbcce2acbf280be9e3ccb2e8 (patch)
tree89547af5cbce81752393b8796d49c98a6664a1ea /test
parentc00643c18a6c4da2c3c5ff05f8b3987523bc23e2 (diff)
[ruby/reline] Add a test that dialog may appear at the top if cursor at bottom edge
https://github.com/ruby/reline/commit/6c2ab47958
Diffstat (limited to 'test')
-rw-r--r--test/reline/yamatanooroti/test_rendering.rb21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb
index fdfcaf97c0..c147d1cf99 100644
--- a/test/reline/yamatanooroti/test_rendering.rb
+++ b/test/reline/yamatanooroti/test_rendering.rb
@@ -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')