summaryrefslogtreecommitdiff
path: root/test/reline
diff options
context:
space:
mode:
authortomoya ishida <tomoyapenguin@gmail.com>2023-03-18 23:37:05 +0900
committergit <svn-admin@ruby-lang.org>2023-03-18 14:37:10 +0000
commite8e7ff1333b9b32d72a1d8f789a186d58c811420 (patch)
tree11a80cd1fee32eedb84d2ecb498952436a8ec59f /test/reline
parentcb22d78354e201ca74eba68a8b4edefb593e6754 (diff)
downloadruby-e8e7ff1333b9b32d72a1d8f789a186d58c811420.tar.gz
[ruby/reline] Fix: line longer than terminal width breaks rendering
(https://github.com/ruby/reline/pull/516) https://github.com/ruby/reline/commit/ae5f9b87ab
Diffstat (limited to 'test/reline')
-rw-r--r--test/reline/yamatanooroti/test_rendering.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb
index 3b9943b486..e3ff83bab6 100644
--- a/test/reline/yamatanooroti/test_rendering.rb
+++ b/test/reline/yamatanooroti/test_rendering.rb
@@ -281,6 +281,23 @@ begin
EOC
end
+ def test_multiline_add_new_line_and_autowrap
+ start_terminal(10, 20, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.')
+ write("def aaaaaaaaaa")
+ write("\n")
+ write(" bbbbbbbbbbbb")
+ write("\n")
+ close
+ assert_screen(<<~EOC)
+ Multiline REPL.
+ prompt> def aaaaaaaa
+ aa
+ prompt> bbbbbbbbbb
+ bb
+ prompt>
+ EOC
+ end
+
def test_clear
start_terminal(10, 15, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl}, startup_message: 'Multiline REPL.')
write("3\C-l")