diff options
| author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-29 05:21:47 +0000 |
|---|---|---|
| committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-11-29 05:21:47 +0000 |
| commit | 9fdc6ff0d98ded8ebb5b5c9ec8fb6d302855e0a7 (patch) | |
| tree | d75eed961dda68ceb46b769a14424f5551818e97 /test/io/nonblock | |
| parent | 846c670ae099e101f8b2ba8aee5756a9fbfec899 (diff) | |
| download | ruby-9fdc6ff0d98ded8ebb5b5c9ec8fb6d302855e0a7.tar.gz ruby-9fdc6ff0d98ded8ebb5b5c9ec8fb6d302855e0a7.tar.xz ruby-9fdc6ff0d98ded8ebb5b5c9ec8fb6d302855e0a7.zip | |
* test/io/nonblock/test_flush.rb: test transferred data.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/io/nonblock')
| -rw-r--r-- | test/io/nonblock/test_flush.rb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/test/io/nonblock/test_flush.rb b/test/io/nonblock/test_flush.rb index 5ca4beba6..dbe20722c 100644 --- a/test/io/nonblock/test_flush.rb +++ b/test/io/nonblock/test_flush.rb @@ -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 |
