diff options
Diffstat (limited to 'test')
-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 |