mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-26 04:28:20 +01:00
Merge branch 'tests52' of https://github.com/Florob/luasocket into Florob-tests52
This commit is contained in:
commit
af55d25675
@ -617,13 +617,16 @@ end
|
||||
|
||||
------------------------------------------------------------------------
|
||||
test("method registration")
|
||||
test_methods(socket.tcp(), {
|
||||
|
||||
local tcp_methods = {
|
||||
"accept",
|
||||
"bind",
|
||||
"close",
|
||||
"connect",
|
||||
"dirty",
|
||||
"getfamily",
|
||||
"getfd",
|
||||
"getoption",
|
||||
"getpeername",
|
||||
"getsockname",
|
||||
"getstats",
|
||||
@ -637,13 +640,16 @@ test_methods(socket.tcp(), {
|
||||
"setsockname",
|
||||
"settimeout",
|
||||
"shutdown",
|
||||
})
|
||||
}
|
||||
test_methods(socket.tcp(), tcp_methods)
|
||||
test_methods(socket.tcp6(), tcp_methods)
|
||||
|
||||
test_methods(socket.udp(), {
|
||||
local udp_methods = {
|
||||
"close",
|
||||
"getpeername",
|
||||
"dirty",
|
||||
"getfamily",
|
||||
"getfd",
|
||||
"getoption",
|
||||
"getpeername",
|
||||
"getsockname",
|
||||
"receive",
|
||||
@ -655,7 +661,9 @@ test_methods(socket.udp(), {
|
||||
"setpeername",
|
||||
"setsockname",
|
||||
"settimeout"
|
||||
})
|
||||
}
|
||||
test_methods(socket.udp(), udp_methods)
|
||||
test_methods(socket.udp6(), udp_methods)
|
||||
|
||||
test("partial receive")
|
||||
test_partialrecv()
|
||||
|
@ -15,6 +15,6 @@ while 1 do
|
||||
assert(command, emsg)
|
||||
assert(control:send(ack));
|
||||
print(command);
|
||||
(load(command))();
|
||||
((loadstring or load)(command))();
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user