ruby-changes:67689
From: aycabta <ko1@a...>
Date: Fri, 10 Sep 2021 09:06:22 +0900 (JST)
Subject: [ruby-changes:67689] b00522608f (master): [ruby/reline] Add a test that autocompletion returns to the original text
https://git.ruby-lang.org/ruby.git/commit/?id=b00522608f From b00522608fb8ccdc81a5561dca1157e0f64922e8 Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Fri, 10 Sep 2021 08:08:56 +0900 Subject: [ruby/reline] Add a test that autocompletion returns to the original text https://github.com/ruby/reline/commit/d80880e56b --- test/reline/yamatanooroti/test_rendering.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb index 8b06cd8..d105405 100644 --- a/test/reline/yamatanooroti/test_rendering.rb +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -894,6 +894,21 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L894 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(' ') -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/