diff options
author | aycabta <aycabta@gmail.com> | 2021-02-03 17:56:49 +0900 |
---|---|---|
committer | aycabta <aycabta@gmail.com> | 2021-02-07 05:12:07 +0900 |
commit | fee19da2305c2977985206b7db86917d0f7ac8db (patch) | |
tree | d9a830adca1a63777e88453e5d205df6b4582dbc /test/reline/yamatanooroti | |
parent | a19ed1623f0341471b90888d02cfcf2601c5f2db (diff) |
[ruby/reline] Autowrap correctly when inserting chars in the middle of a line
https://github.com/ruby/reline/commit/ebaf37255f
Diffstat (limited to 'test/reline/yamatanooroti')
-rw-r--r-- | test/reline/yamatanooroti/test_rendering.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb index b583f8ddac..22c9316429 100644 --- a/test/reline/yamatanooroti/test_rendering.rb +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -678,6 +678,20 @@ begin EOC end + def test_autowrap_in_the_middle_of_a_line + start_terminal(5, 20, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.') + write("def abcdefg; end\C-b\C-b\C-b\C-b\C-b") + %w{h i}.each do |c| + write(c) + end + close + assert_screen(<<~EOC) + Multiline REPL. + prompt> def abcdefgh + i; end + EOC + end + private def write_inputrc(content) File.open(@inputrc_file, 'w') do |f| f.write content |