Skip to content

Commit

Permalink
test_io.rb: add test
Browse files Browse the repository at this point in the history
* test/ruby/test_io.rb (tesst_pid_after_close_read): test for r43117.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43118 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
  • Loading branch information
nobu committed Oct 2, 2013
1 parent bda5eac commit a2d21de
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/ruby/test_io.rb
Expand Up @@ -1409,6 +1409,17 @@ def test_pid
assert_raise(IOError) { pipe.pid }
end

def tesst_pid_after_close_read

This comment has been minimized.

Copy link
@splattael

splattael Oct 2, 2013

Contributor

@nobu it should read test_pid_after_close_read

pid1 = pid2 = nil
IO.popen(["echo", ""], "r+") do |io|
pid1 = io.pid
io.close_read
pid2 = io.pid
end
assert_not_nil(pid1)
assert_equal(pid1, pid2)
end

def make_tempfile
t = Tempfile.new("test_io")
t.binmode
Expand Down

0 comments on commit a2d21de

Please sign in to comment.