diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-30 13:50:13 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-06-30 13:50:13 +0000 |
commit | cac79cc38886da8674f95b717ecc108961df3a02 (patch) | |
tree | 6e1af595eef460b3438c2b2f59c88f89067853a5 /test/socket/test_unix.rb | |
parent | fce76df67ce82cca43f7bffae1dd1fdf7b433cae (diff) | |
download | ruby-cac79cc38886da8674f95b717ecc108961df3a02.tar.gz |
add a test for [ruby-dev:34619].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/socket/test_unix.rb')
-rw-r--r-- | test/socket/test_unix.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/socket/test_unix.rb b/test/socket/test_unix.rb index 3bd3d94c9d..9a2578966c 100644 --- a/test/socket/test_unix.rb +++ b/test/socket/test_unix.rb @@ -137,4 +137,12 @@ class TestUNIXSocket < Test::Unit::TestCase s2.close if s2 end + def test_epipe # [ruby-dev:34619] + s1, s2 = UNIXSocket.pair + s1.shutdown(Socket::SHUT_WR) + assert_raise(Errno::EPIPE) { s1.write "a" } + s2.write "a" + assert_equal("a", s1.read(1)) + end + end if defined?(UNIXSocket) && /cygwin/ !~ RUBY_PLATFORM |