ruby-changes:63915
From: aycabta <ko1@a...>
Date: Sat, 5 Dec 2020 03:09:07 +0900 (JST)
Subject: [ruby-changes:63915] 87f51c7e66 (master): [ruby/reline] Use startup_option instead of startup wait
https://git.ruby-lang.org/ruby.git/commit/?id=87f51c7e66 From 87f51c7e66f9e92242621dda526c668071c315be Mon Sep 17 00:00:00 2001 From: aycabta <aycabta@g...> Date: Fri, 9 Oct 2020 21:30:57 +0900 Subject: [ruby/reline] Use startup_option instead of startup wait https://github.com/ruby/reline/commit/a63ce6371c diff --git a/lib/reline/reline.gemspec b/lib/reline/reline.gemspec index 1962f61..e0d9f3d 100644 --- a/lib/reline/reline.gemspec +++ b/lib/reline/reline.gemspec @@ -23,4 +23,5 @@ Gem::Specification.new do |spec| https://github.com/ruby/ruby/blob/trunk/lib/reline/reline.gemspec#L23 spec.add_development_dependency 'bundler' spec.add_development_dependency 'rake' spec.add_development_dependency 'test-unit' + spec.add_development_dependency 'yamatanooroti', '>= 0.0.5' end diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb index 20b0aae..7b32f0a 100644 --- a/test/reline/yamatanooroti/test_rendering.rb +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -26,8 +26,7 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L26 end def test_history_back - start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}) - sleep 0.5 + start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.') write(":a\n") write("\C-p") close @@ -40,8 +39,7 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L39 end def test_backspace - start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}) - sleep 0.5 + start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.') write(":abc\C-h\n") close assert_screen(<<~EOC) @@ -53,8 +51,7 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L51 end def test_autowrap - start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}) - sleep 0.5 + start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.') write('01234567890123456789012') close assert_screen(<<~EOC) @@ -65,8 +62,7 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L62 end def test_finish_autowrapped_line - start_terminal(10, 40, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}) - sleep 0.5 + start_terminal(10, 40, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.') write("[{'user'=>{'email'=>'a@a', 'id'=>'ABC'}, 'version'=>4, 'status'=>'succeeded'}]\n") close assert_screen(<<~EOC) @@ -82,8 +78,7 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L78 end def test_finish_autowrapped_line_in_the_middle_of_lines - start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}) - sleep 0.5 + start_terminal(20, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.') write("[{'user'=>{'email'=>'abcdef@abcdef', 'id'=>'ABC'}, 'version'=>4, 'status'=>'succeeded'}]#{"\C-b"*7}\n") close assert_screen(<<~EOC) @@ -101,8 +96,7 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L96 end def test_finish_autowrapped_line_in_the_middle_of_multilines - start_terminal(30, 16, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}) - sleep 0.5 + start_terminal(30, 16, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.') write("<<~EOM\n ABCDEFG\nEOM\n") close assert_screen(<<~'EOC') @@ -120,8 +114,7 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L114 write_inputrc <<~'LINES' "abc": "123" LINES - start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}) - sleep 0.5 + start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.') write("abc\n") close assert_screen(<<~EOC) @@ -136,8 +129,7 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L129 write_inputrc <<~LINES set show-mode-in-prompt on LINES - start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}) - sleep 0.5 + start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.') close assert_screen(<<~EOC) Multiline REPL. @@ -150,8 +142,7 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L142 set editing-mode vi set show-mode-in-prompt on LINES - start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}) - sleep 0.5 + start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.') write(":a\n\C-[k") close assert_screen(<<~EOC) @@ -167,8 +158,7 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L158 set show-mode-in-prompt on set emacs-mode-string [emacs] LINES - start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}) - sleep 0.5 + start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.') close assert_screen(<<~EOC) Multiline REPL. @@ -181,8 +171,7 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L171 set show-mode-in-prompt on set emacs-mode-string "[emacs]" LINES - start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}) - sleep 0.5 + start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.') close assert_screen(<<~EOC) Multiline REPL. @@ -197,8 +186,7 @@ begin https://github.com/ruby/ruby/blob/trunk/test/reline/yamatanooroti/test_rendering.rb#L186 set vi-ins-mode-string "{InS}" set vi-cmd-mode-string "{CmD}" LINES - start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}) - sleep 0.5 + start_terminal(5, 30, %W{ruby -I#{@pwd}/lib #{@pwd}/bin/multiline_repl}, startup_message: 'Multiline REPL.') write(":a\n\C-[k") close assert_screen(<<~EOC) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/