repo.or.cz
/
kgio.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
Close tempfile and unlink it immediately.
[kgio.git]
/
test
/
test_unix_server.rb
blob
96769b1ce69b0de3af5771ba39cfa13a234e6524
1
require 'tempfile'
2
require 'tmpdir'
3
require './test/lib_server_accept'
4
5
class TestKgioUNIXServer < Test::Unit::TestCase
6
7
def setup
8
@tmpdir = Dir.mktmpdir('kgio_unix_2')
9
tmp = Tempfile.new('kgio_unix_2', @tmpdir)
10
@path = tmp.path
11
tmp.close!
12
@srv = Kgio::UNIXServer.new(@path)
13
@host = '127.0.0.1'
14
end
15
16
def client_connect
17
UNIXSocket.new(@path)
18
end
19
20
include LibServerAccept
21
end