summaryrefslogtreecommitdiff
path: root/test/reline/yamatanooroti/test_rendering.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/reline/yamatanooroti/test_rendering.rb')
-rw-r--r--test/reline/yamatanooroti/test_rendering.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb
index 0ec48c1896..3ba157a7ef 100644
--- a/test/reline/yamatanooroti/test_rendering.rb
+++ b/test/reline/yamatanooroti/test_rendering.rb
@@ -620,6 +620,24 @@ begin
EOC
end
+ def test_update_cursor_correctly_when_just_cursor_moving
+ start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.')
+ puts %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}.inspect
+ write("def hoge\n 01234678")
+ write("\C-p")
+ write("\C-b")
+ write("\C-n")
+ write('5')
+ write("\C-e")
+ write('9')
+ close
+ assert_screen(<<~EOC)
+ Multiline REPL.
+ prompt> def hoge
+ prompt> 0123456789
+ EOC
+ end
+
private def write_inputrc(content)
File.open(@inputrc_file, 'w') do |f|
f.write content