Added simple unix tests.
This commit is contained in:
parent
be2e467929
commit
37f266ceea
3 changed files with 17 additions and 10 deletions
9
test/unixsrvr.lua
Normal file
9
test/unixsrvr.lua
Normal file
|
@ -0,0 +1,9 @@
|
|||
socket = require"socket"
|
||||
socket.unix = require"socket.unix"
|
||||
u = assert(socket.unix())
|
||||
assert(u:bind("/tmp/foo"))
|
||||
assert(u:listen())
|
||||
c = assert(u:accept())
|
||||
while 1 do
|
||||
print(assert(c:receive()))
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue