diff options
author | moteus <mimir@newmail.ru> | 2013-05-27 11:26:35 +0400 |
---|---|---|
committer | moteus <mimir@newmail.ru> | 2013-05-27 11:26:35 +0400 |
commit | bd51d8c1a5bb30e6a358dee6e85963f777edfff4 (patch) | |
tree | 174c98f83b165a1546e628daa80519ef10bdff3d /test | |
parent | e54f78c61cac7b0d7fe1e89d337b9ab06f40bdb0 (diff) | |
download | luasocket-bd51d8c1a5bb30e6a358dee6e85963f777edfff4.tar.gz luasocket-bd51d8c1a5bb30e6a358dee6e85963f777edfff4.tar.bz2 luasocket-bd51d8c1a5bb30e6a358dee6e85963f777edfff4.zip |
Fix. Optional IPv6 test
Diffstat (limited to 'test')
-rw-r--r-- | test/testclnt.lua | 10 |
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 | } |
644 | test_methods(socket.tcp(), tcp_methods) | 644 | test_methods(socket.tcp(), tcp_methods) |
645 | test_methods(socket.tcp6(), tcp_methods) | 645 | do local sock = socket.tcp6() |
646 | if sock then test_methods(socket.tcp6(), tcp_methods) | ||
647 | else io.stderr:write("Warning! IPv6 does not support!\n") end | ||
648 | end | ||
646 | 649 | ||
647 | local udp_methods = { | 650 | local udp_methods = { |
648 | "close", | 651 | "close", |
@@ -666,7 +669,10 @@ local udp_methods = { | |||
666 | 669 | ||
667 | ------------------------------------------------------------------------ | 670 | ------------------------------------------------------------------------ |
668 | test_methods(socket.udp(), udp_methods) | 671 | test_methods(socket.udp(), udp_methods) |
669 | test_methods(socket.udp6(), udp_methods) | 672 | do local sock = socket.tcp6() |
673 | if sock then test_methods(socket.udp6(), udp_methods) | ||
674 | else io.stderr:write("Warning! IPv6 does not support!\n") end | ||
675 | end | ||
670 | 676 | ||
671 | test("partial receive") | 677 | test("partial receive") |
672 | test_partialrecv() | 678 | test_partialrecv() |