summaryrefslogtreecommitdiff
path: root/test/reline/yamatanooroti/multiline_repl
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-09-10 04:36:55 +0900
committergit <svn-admin@ruby-lang.org>2021-09-10 09:04:36 +0900
commit364e646317fb9bf0f284532ad8a1c1e707bcbb21 (patch)
treea2e7c4833bf1069ab68c39650a7ff0af1e4b44e5 /test/reline/yamatanooroti/multiline_repl
parent44759533786562d0ff5c49147d050ea685e97ea5 (diff)
[ruby/reline] Add a test for simple dialog
https://github.com/ruby/reline/commit/d70f507e2c
Diffstat (limited to 'test/reline/yamatanooroti/multiline_repl')
-rwxr-xr-xtest/reline/yamatanooroti/multiline_repl13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/multiline_repl b/test/reline/yamatanooroti/multiline_repl
index b21ad4bd8c..4de3f81c47 100755
--- a/test/reline/yamatanooroti/multiline_repl
+++ b/test/reline/yamatanooroti/multiline_repl
@@ -30,6 +30,19 @@ opt.on('--dynamic-prompt-returns-empty') {
opt.on('--auto-indent') {
AutoIndent.new
}
+opt.on('--simple-dialog') {
+ Reline.add_dialog_proc(:simple_dialog, lambda {
+ contents = <<~RUBY.split("\n")
+ Ruby is...
+ A dynamic, open source programming
+ language with a focus on simplicity
+ and productivity. It has an elegant
+ syntax that is natural to read and
+ easy to write.
+ RUBY
+ Reline::DialogRenderInfo.new(pos: cursor_pos, contents: contents)
+ })
+}
opt.on('--complete') {
Reline.completion_proc = lambda { |target, preposing = nil, postposing = nil|
%w{String ScriptError SyntaxError Signal}