Merge branch 'tests52' of https://github.com/Florob/luasocket into Florob-tests52

This commit is contained in:
Diego Nehab 2012-05-01 16:12:16 +08:00
commit af55d25675
2 changed files with 14 additions and 6 deletions

View File

@ -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()

View File

@ -15,6 +15,6 @@ while 1 do
assert(command, emsg)
assert(control:send(ack));
print(command);
(load(command))();
((loadstring or load)(command))();
end
end