diff options
author | aycabta <aycabta@gmail.com> | 2021-09-02 04:43:36 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2021-09-02 14:07:48 +0900 |
commit | 4852d87a81ae8b7f239787bdc18560f89dd18cab (patch) | |
tree | ccea6e231492d2d73c9459cfa2e19c031f17041a /test | |
parent | 5f23003cc204182134af2682f1de1e8801b3f423 (diff) |
[ruby/reline] Fix a crash when completing empty line
https://github.com/ruby/reline/commit/8226ae7e57
Diffstat (limited to 'test')
-rw-r--r-- | test/reline/yamatanooroti/test_rendering.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb index 0ea5b1a25d..7a73f07d5d 100644 --- a/test/reline/yamatanooroti/test_rendering.rb +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -823,6 +823,19 @@ begin EOC end + def test_completion_journey_with_empty_line + write_inputrc <<~LINES + set editing-mode vi + LINES + start_terminal(10, 50, %W{ruby -I#{@pwd}/lib #{@pwd}/test/reline/yamatanooroti/multiline_repl --complete}, startup_message: 'Multiline REPL.') + write("\C-n\C-p") + close + assert_screen(<<~'EOC') + Multiline REPL. + prompt> + EOC + end + def write_inputrc(content) File.open(@inputrc_file, 'w') do |f| f.write content |