summaryrefslogtreecommitdiff
path: root/test/reline/yamatanooroti
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-01-05 18:29:09 +0900
committeraycabta <aycabta@gmail.com>2021-01-08 13:25:18 +0900
commit76c9a3c8c633241c86024a027a644f1dd6dbbc44 (patch)
tree52328c4d8b67d028645db7b17846a9e1a097aabe /test/reline/yamatanooroti
parent88af5085dbf61dcd815e66aa9fe96c7d612c9747 (diff)
[ruby/reline] Suppress crashing when dynamic_prompt_proc returns a broken prompt list
Co-authored-by: Juanito Fatas <me@juanitofatas.com> https://github.com/ruby/reline/commit/558f7be168
Diffstat (limited to 'test/reline/yamatanooroti')
-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 ce8c4cec24..9c8df1f215 100644
--- a/test/reline/yamatanooroti/test_rendering.rb
+++ b/test/reline/yamatanooroti/test_rendering.rb
@@ -450,6 +450,18 @@ begin
EOC
end
+ def test_broken_prompt_list
+ start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl --broken-dynamic-prompt}, startup_message: 'Multiline REPL.')
+ write("def hoge\n 3\nend")
+ close
+ assert_screen(<<~EOC)
+ Multiline REPL.
+ [0000]> def hoge
+ [0001]> 3
+ [0001]> end
+ EOC
+ end
+
def test_enable_bracketed_paste
omit if Reline::IOGate.win?
write_inputrc <<~LINES