From c00643c18a6c4da2c3c5ff05f8b3987523bc23e2 Mon Sep 17 00:00:00 2001 From: aycabta Date: Fri, 10 Sep 2021 06:42:58 +0900 Subject: [ruby/reline] Add a test for dialog at right edge https://github.com/ruby/reline/commit/db642169b9 --- test/reline/yamatanooroti/test_rendering.rb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'test') 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') -- cgit v1.2.3