test_io.rb: add test
* 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
This commit is contained in:
parent
bda5eac115
commit
a2d21de1c8
@ -1409,6 +1409,17 @@ class TestIO < Test::Unit::TestCase
|
||||
assert_raise(IOError) { pipe.pid }
|
||||
end
|
||||
|
||||
def tesst_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
|
||||
|
Loading…
x
Reference in New Issue
Block a user