[前][次][番号順一覧][スレッド一覧]

ruby-changes:67691

From: aycabta <ko1@a...>
Date: Fri, 10 Sep 2021 09:06:44 +0900 (JST)
Subject: [ruby-changes:67691] a22c04a1d9 (master): [ruby/reline] Add a test that autocomplete doesn't crash after 2nd line

https://git.ruby-lang.org/ruby.git/commit/?id=a22c04a1d9

From a22c04a1d900746761da93e5051a6b22571b94cc Mon Sep 17 00:00:00 2001
From: aycabta <aycabta@g...>
Date: Fri, 10 Sep 2021 08:24:37 +0900
Subject: [ruby/reline] Add a test that autocomplete doesn't crash after 2nd
 line

https://github.com/ruby/reline/commit/f682c74975
---
 test/reline/yamatanooroti/test_rendering.rb | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb
index 285a10c..b29a34e 100644
--- a/test/reline/yamatanooroti/test_rendering.rb
+++ b/test/reline/yamatanooroti/test_rendering.rb
@@ -961,6 +961,19 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L961
       EOC
     end
 
+    def test_autocomplete_after_2nd_line
+      start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete}, startup_message: 'Multiline REPL.')
+      write("def hoge\n  Str")
+      close
+      assert_screen(<<~'EOC')
+        Multiline REPL.
+        prompt> def hoge
+        prompt>   Str
+                  String
+                  Struct
+      EOC
+    end
+
     def test_autocomplete_long_with_scrollbar
       start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --autocomplete-long}, startup_message: 'Multiline REPL.')
       write('S')
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]