aboutsummaryrefslogtreecommitdiffstats
path: root/test/reline/yamatanooroti
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2020-09-12 01:51:26 +0900
committeraycabta <aycabta@gmail.com>2020-09-12 08:35:52 +0900
commitf36dc2b6de54ec6b82766d2134a782d12628a2b9 (patch)
tree8c5f992aeaaeaf0fc47ea4159d49f98f42817bc9 /test/reline/yamatanooroti
parentce389ade45f412351d7c91db60eaa5e19fcd8c5f (diff)
downloadruby-f36dc2b6de54ec6b82766d2134a782d12628a2b9.tar.gz
[ruby/reline] Treat prompt correctly when Reline.prompt_proc isn't set
https://github.com/ruby/reline/commit/9c9ba0eff3
Diffstat (limited to 'test/reline/yamatanooroti')
-rw-r--r--test/reline/yamatanooroti/test_rendering.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb
index effeb7cff2..0ab43fa60c 100644
--- a/test/reline/yamatanooroti/test_rendering.rb
+++ b/test/reline/yamatanooroti/test_rendering.rb
@@ -100,6 +100,22 @@ begin
EOC
end
+ def test_finish_autowrapped_line_in_the_middle_of_multilines
+ start_terminal(30, 16, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl})
+ sleep 0.5
+ write("<<~EOM\n ABCDEFG\nEOM\n")
+ close
+ assert_screen(<<~'EOC')
+ Multiline REPL.
+ prompt> <<~EOM
+ prompt> ABCDEF
+ G
+ prompt> EOM
+ => "ABCDEFG\n"
+ prompt>
+ EOC
+ end
+
def test_prompt
File.open(@inputrc_file, 'w') do |f|
f.write <<~'LINES'