1
0
Fork 0
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:
nobu 2004-11-29 05:21:47 +00:00
parent e73b5c9bfc
commit 6e22160537

View file

@ -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