diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-25 13:34:21 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2014-10-25 13:34:21 +0000 |
commit | 1fe90db5380117580ae41be4f3d01686aaa73697 (patch) | |
tree | d6f825811bd53f4783879a64360d6ee840cefce0 /test | |
parent | 96d375540f390579fa93024819fb14ca05b9cd5e (diff) | |
download | ruby-1fe90db5380117580ae41be4f3d01686aaa73697.tar.gz |
* io.c (io_binwrite_string): Test writev() failure.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_io.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_io.rb b/test/ruby/test_io.rb index 557ad0897b..18157fabf1 100644 --- a/test/ruby/test_io.rb +++ b/test/ruby/test_io.rb @@ -1370,6 +1370,17 @@ class TestIO < Test::Unit::TestCase end end + def test_close_read_pipe_nosync + assert_separately([], <<-"end;") + r, w = IO.pipe + r.close + w.sync = false + assert_raise(Errno::EPIPE) { + loop { w.write "a" } + } + end; + end + def test_close_read_non_readable with_pipe do |r, w| assert_raise(IOError) do |