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:
parent
fce76df67c
commit
cac79cc388
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue