1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

add a test for [ruby-dev:34619].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17742 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-06-30 13:50:13 +00:00
parent fce76df67c
commit cac79cc388

View file

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