summaryrefslogtreecommitdiff
path: root/test/reline/yamatanooroti
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-09-10 08:08:56 +0900
committergit <svn-admin@ruby-lang.org>2021-09-10 09:06:08 +0900
commitb00522608fb8ccdc81a5561dca1157e0f64922e8 (patch)
tree79c9f7ee9796d182ef15a2cae5f1daec41966b21 /test/reline/yamatanooroti
parent90f0f22fcc905aed76772b583691d9615dcc91b8 (diff)
[ruby/reline] Add a test that autocompletion returns to the original text
https://github.com/ruby/reline/commit/d80880e56b
Diffstat (limited to 'test/reline/yamatanooroti')
-rw-r--r--test/reline/yamatanooroti/test_rendering.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb
index 8b06cd8244..d105405500 100644
--- a/test/reline/yamatanooroti/test_rendering.rb
+++ b/test/reline/yamatanooroti/test_rendering.rb
@@ -894,6 +894,21 @@ begin
EOC
end
+ def test_autocomplete_return_to_original
+ start_terminal(20, 20, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
+ write('S')
+ write('t')
+ write('r')
+ 3.times{ write("\C-i") }
+ close
+ assert_screen(<<~'EOC')
+ Multiline REPL.
+ prompt> Str
+ String
+ Struct
+ EOC
+ end
+
def test_autocomplete_target_is_wrapped
start_terminal(20, 20, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
write(' ')