diff options
Diffstat (limited to 'test/socket/test_unix.rb')
-rw-r--r-- | test/socket/test_unix.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/socket/test_unix.rb b/test/socket/test_unix.rb index d3b17450f1..2b1f4deb33 100644 --- a/test/socket/test_unix.rb +++ b/test/socket/test_unix.rb @@ -296,6 +296,17 @@ class TestSocket_UNIXSocket < Test::Unit::TestCase } end + def test_unix_server_socket + Dir.mktmpdir {|d| + path = "#{d}/sock" + Socket.unix_server_socket(path) {|s| + assert_equal(path, s.local_address.unix_path) + assert(File.socket?(path)) + } + assert_raise(Errno::ENOENT) { File.stat path } + } + end + def test_getcred_ucred return if /linux/ !~ RUBY_PLATFORM Dir.mktmpdir {|d| |