aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authormoteus <mimir@newmail.ru>2013-05-27 11:26:35 +0400
committermoteus <mimir@newmail.ru>2013-05-27 11:26:35 +0400
commitbd51d8c1a5bb30e6a358dee6e85963f777edfff4 (patch)
tree174c98f83b165a1546e628daa80519ef10bdff3d /test
parente54f78c61cac7b0d7fe1e89d337b9ab06f40bdb0 (diff)
downloadluasocket-bd51d8c1a5bb30e6a358dee6e85963f777edfff4.tar.gz
luasocket-bd51d8c1a5bb30e6a358dee6e85963f777edfff4.tar.bz2
luasocket-bd51d8c1a5bb30e6a358dee6e85963f777edfff4.zip
Fix. Optional IPv6 test
Diffstat (limited to 'test')
-rw-r--r--test/testclnt.lua10
1 files changed, 8 insertions, 2 deletions
diff --git a/test/testclnt.lua b/test/testclnt.lua
index 8acb3d0..315783b 100644
--- a/test/testclnt.lua
+++ b/test/testclnt.lua
@@ -642,7 +642,10 @@ local tcp_methods = {
642 "shutdown", 642 "shutdown",
643} 643}
644test_methods(socket.tcp(), tcp_methods) 644test_methods(socket.tcp(), tcp_methods)
645test_methods(socket.tcp6(), tcp_methods) 645do local sock = socket.tcp6()
646if sock then test_methods(socket.tcp6(), tcp_methods)
647else io.stderr:write("Warning! IPv6 does not support!\n") end
648end
646 649
647local udp_methods = { 650local udp_methods = {
648 "close", 651 "close",
@@ -666,7 +669,10 @@ local udp_methods = {
666 669
667------------------------------------------------------------------------ 670------------------------------------------------------------------------
668test_methods(socket.udp(), udp_methods) 671test_methods(socket.udp(), udp_methods)
669test_methods(socket.udp6(), udp_methods) 672do local sock = socket.tcp6()
673if sock then test_methods(socket.udp6(), udp_methods)
674else io.stderr:write("Warning! IPv6 does not support!\n") end
675end
670 676
671test("partial receive") 677test("partial receive")
672test_partialrecv() 678test_partialrecv()