From cf0b9e0db04925fc7bb31366b4dc053beab0bd57 Mon Sep 17 00:00:00 2001 From: tomoya ishida Date: Sun, 28 May 2023 00:07:25 +0900 Subject: [ruby/reline] Fix scrolldown condition in dialog rendering (https://github.com/ruby/reline/pull/541) https://github.com/ruby/reline/commit/ad6faada3f --- 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 1a0f8767ee..d2053b3d85 100644 --- a/test/reline/yamatanooroti/test_rendering.rb +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -957,6 +957,25 @@ begin EOC end + def test_dialog_scroll_pushup_condition + start_terminal(10, 50, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.') + write("\n" * 10) + write("if 1\n sSt\nend") + write("\C-p\C-h\C-e") + assert_screen(<<~'EOC') + prompt> + prompt> + prompt> + prompt> + prompt> + prompt> + prompt> if 1 + prompt> St + prompt> enString + Struct + EOC + end + def test_simple_dialog_with_scroll_screen start_terminal(5, 50, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --dialog simple}, startup_message: 'Multiline REPL.') write("if 1\n 2\n 3\n 4\n 5\n 6") -- cgit v1.2.3