diff options
author | tomoya ishida <tomoyapenguin@gmail.com> | 2024-06-25 09:55:02 +0900 |
---|---|---|
committer | git <svn-admin@ruby-lang.org> | 2024-06-25 00:55:07 +0000 |
commit | 691d85d3429891f659e9ebfab6286fa65615be03 (patch) | |
tree | d7d82a0400504148f9d2719c939485477555768f /test | |
parent | ae0c7faa79029ebe615487d23c8ee1ca44ce4a36 (diff) | |
download | ruby-691d85d3429891f659e9ebfab6286fa65615be03.tar.gz |
[ruby/reline] Rerender and enter raw mode again by SIGCONT
(https://github.com/ruby/reline/pull/727)
https://github.com/ruby/reline/commit/be45660c83
Diffstat (limited to 'test')
-rw-r--r-- | test/reline/yamatanooroti/test_rendering.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/reline/yamatanooroti/test_rendering.rb b/test/reline/yamatanooroti/test_rendering.rb index f119d686cd..3722a28620 100644 --- a/test/reline/yamatanooroti/test_rendering.rb +++ b/test/reline/yamatanooroti/test_rendering.rb @@ -1840,6 +1840,25 @@ begin EOC end + def test_stop_continue + pidfile = Tempfile.create('pidfile') + rubyfile = Tempfile.create('rubyfile') + rubyfile.write <<~RUBY + File.write(#{pidfile.path.inspect}, Process.pid) + p Reline.readmultiline('>'){false} + RUBY + rubyfile.close + start_terminal(40, 50, ['bash']) + write "ruby -I#{@pwd}/lib -rreline #{rubyfile.path}\n" + write "abc\ndef\nhi" + pid = pidfile.tap(&:rewind).read.to_i + Process.kill(:STOP, pid) unless pid.zero? + write "fg\n" + write "\ebg" + close + assert_include result.join("\n"), ">abc\n>def\n>ghi\n" + end + def write_inputrc(content) File.open(@inputrc_file, 'w') do |f| f.write content |