summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authoraycabta <aycabta@gmail.com>2021-09-10 07:37:12 +0900
committergit <svn-admin@ruby-lang.org>2021-09-10 09:05:35 +0900
commit8e6ed5d75b24ddf5249e877cdc32171ef2140140 (patch)
tree35ec48e3b313baeb7be7f723506992b9ab4c95a6 /test
parent5af602e4d48fd9951bcdd873b3e471ca4b123d45 (diff)
[ruby/reline] Add a test for when completion target is wrapped
https://github.com/ruby/reline/commit/25a94d70c3
Diffstat (limited to 'test')
-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 59fc5111aa..06d59c25ce 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_target_is_wrapped
+ start_terminal(20, 20, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
+ write(' ')
+ write('S')
+ write('t')
+ write('r')
+ close
+ assert_screen(<<~'EOC')
+ Multiline REPL.
+ prompt> St
+ r String
+ Struct
+ EOC
+ end
+
def test_simple_dialog_with_scroll_key
start_terminal(20, 50, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --dialog long,scrollkey}, startup_message: 'Multiline REPL.')
write('a')