Sha256: cb5787c51816fc5741b603e868527a3ce304c256d3c463671cbbcf56d5ca4c87

Contents?: true

Size: 325 Bytes

Versions: 36

Compression:

Stored size: 325 Bytes

Contents

require 'test/unit'
require 'io/nonblock'
$-w = true
require 'kgio'

class TestPipePopen < Test::Unit::TestCase
  def test_popen
    io = Kgio::Pipe.popen("sleep 1 && echo HI")
    assert_equal :wait_readable, io.kgio_tryread(2)
    sleep 1.5
    assert_equal "HI\n", io.kgio_read(3)
    assert_nil io.kgio_read(5)
  end
end

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
kgio-2.11.4 test/test_pipe_popen.rb
kgio-2.11.3 test/test_pipe_popen.rb
kgio-2.11.2 test/test_pipe_popen.rb
kgio-2.11.1.1.g36ea test/test_pipe_popen.rb
kgio-2.11.1 test/test_pipe_popen.rb
kgio-2.11.0 test/test_pipe_popen.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/kgio-2.10.0/test/test_pipe_popen.rb
kgio-2.10.0 test/test_pipe_popen.rb
kgio-2.9.3 test/test_pipe_popen.rb
kgio-2.9.2 test/test_pipe_popen.rb
kgio-2.9.1 test/test_pipe_popen.rb
kgio-2.9.0.2.gf33a test/test_pipe_popen.rb
kgio-2.9.0 test/test_pipe_popen.rb
kgio-2.8.1 test/test_pipe_popen.rb
kgio-2.8.0.2.g30c1 test/test_pipe_popen.rb
kgio-2.8.0 test/test_pipe_popen.rb
kgio-2.7.4 test/test_pipe_popen.rb
kgio-2.7.3 test/test_pipe_popen.rb
kgio-2.7.2 test/test_pipe_popen.rb
kgio-2.7.1 test/test_pipe_popen.rb