summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-09-10 06:42:58 +0900
committergit <svn-admin@ruby-lang.org>2021-09-10 09:04:56 +0900
commitc00643c18a6c4da2c3c5ff05f8b3987523bc23e2 (patch)
tree4cbe8629e2628fbdd86fc1f2589a7e7ac402bef2 /test
parentc25511ef46c047e970e45e363288e8c005284c31 (diff)
[ruby/reline] Add a test for dialog at right edge
https://github.com/ruby/reline/commit/db642169b9
Diffstat (limited to 'test')
-rw-r--r--test/reline/yamatanooroti/test_rendering.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb
index 278850a7c5..fdfcaf97c0 100644
--- a/test/reline/yamatanooroti/test_rendering.rb
+++ b/test/reline/yamatanooroti/test_rendering.rb
@@ -854,6 +854,25 @@ begin
EOC
end
+ def test_simple_dialog_at_right_edge
+ start_terminal(20, 40, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --dialog simple}, startup_message: 'Multiline REPL.')
+ write('a')
+ write('b')
+ write('c')
+ write("\C-h")
+ close
+ assert_screen(<<~'EOC')
+ Multiline REPL.
+ prompt> ab
+ 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.
+ 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')