summaryrefslogtreecommitdiff
path: root/test/reline
diff options
context:
space:
mode:
authortomoya ishida <tomoyapenguin@gmail.com>2023-03-04 14:55:54 +0900
committergit <svn-admin@ruby-lang.org>2023-03-04 05:56:00 +0000
commit6f81e38d1d77931e46aee0cb054c9cb3a82f3f3b (patch)
treee2dafac0c5f19ddd4656e74e46a56607025ae19c /test/reline
parent4782bb352eaedf934d204ea76956a26d07ec9bcf (diff)
downloadruby-6f81e38d1d77931e46aee0cb054c9cb3a82f3f3b.tar.gz
[ruby/reline] Fix completion with multiline
(https://github.com/ruby/reline/pull/513) https://github.com/ruby/reline/commit/d76c482c5f
Diffstat (limited to 'test/reline')
-rw-r--r--test/reline/yamatanooroti/test_rendering.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb
index d02abc60bc..3b9943b486 100644
--- a/test/reline/yamatanooroti/test_rendering.rb
+++ b/test/reline/yamatanooroti/test_rendering.rb
@@ -839,6 +839,18 @@ begin
EOC
end
+ def test_multiline_completion
+ start_terminal(10, 50, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --complete}, startup_message: 'Multiline REPL.')
+ write("def hoge\n St\n St\C-p\t")
+ close
+ assert_screen(<<~'EOC')
+ Multiline REPL.
+ prompt> def hoge
+ prompt> String
+ prompt> St
+ EOC
+ end
+
def test_completion_journey_2nd_line
write_inputrc <<~LINES
set editing-mode vi