mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* test/io/nonblock/test_flush.rb: test transferred data.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e73b5c9bfc
commit
6e22160537
1 changed files with 7 additions and 3 deletions
|
@ -13,10 +13,14 @@ class TestIONonblock < Test::Unit::TestCase
|
|||
Thread.pass
|
||||
w.close
|
||||
}
|
||||
Thread.new {
|
||||
Thread.pass
|
||||
nil while r.read(4096)
|
||||
result = ""
|
||||
t = Thread.new {
|
||||
while (Thread.pass; s = r.read(4096))
|
||||
result << s
|
||||
end
|
||||
}
|
||||
assert_raise(IOError) {w.flush}
|
||||
t.join
|
||||
assert_equal("b", result)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue