Permalink
Browse files

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

…orob-tests52
  • Loading branch information...
2 parents e86eac9 + 6de0aa5 commit af55d256758e4873bad4a1b743e2b88eed86c464 @diegonehab committed May 1, 2012
Showing with 14 additions and 6 deletions.
  1. +13 −5 test/testclnt.lua
  2. +1 −1 test/testsrvr.lua
View
18 test/testclnt.lua
@@ -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
2 test/testsrvr.lua
@@ -15,6 +15,6 @@ while 1 do
assert(command, emsg)
assert(control:send(ack));
print(command);
- (load(command))();
+ ((loadstring or load)(command))();
end
end

0 comments on commit af55d25

Please sign in to comment.