diff options
| author | Diego Nehab <diego.nehab@gmail.com> | 2012-05-01 16:12:16 +0800 |
|---|---|---|
| committer | Diego Nehab <diego.nehab@gmail.com> | 2012-05-01 16:12:16 +0800 |
| commit | af55d256758e4873bad4a1b743e2b88eed86c464 (patch) | |
| tree | 2053d685bad5cf3bb1b0da6e4fadc8e4c888ca05 | |
| parent | e86eac96fa69eb59f878abf005ac7cedbfaf5736 (diff) | |
| parent | 6de0aa54fd1e296f685acc453bf08a2c2c4bd71f (diff) | |
| download | luasocket-af55d256758e4873bad4a1b743e2b88eed86c464.tar.gz luasocket-af55d256758e4873bad4a1b743e2b88eed86c464.tar.bz2 luasocket-af55d256758e4873bad4a1b743e2b88eed86c464.zip | |
Merge branch 'tests52' of https://github.com/Florob/luasocket into Florob-tests52
| -rw-r--r-- | test/testclnt.lua | 18 | ||||
| -rw-r--r-- | test/testsrvr.lua | 2 |
2 files changed, 14 insertions, 6 deletions
diff --git a/test/testclnt.lua b/test/testclnt.lua index b4b7063..a510ded 100644 --- a/test/testclnt.lua +++ b/test/testclnt.lua | |||
| @@ -617,13 +617,16 @@ end | |||
| 617 | 617 | ||
| 618 | ------------------------------------------------------------------------ | 618 | ------------------------------------------------------------------------ |
| 619 | test("method registration") | 619 | test("method registration") |
| 620 | test_methods(socket.tcp(), { | 620 | |
| 621 | local tcp_methods = { | ||
| 621 | "accept", | 622 | "accept", |
| 622 | "bind", | 623 | "bind", |
| 623 | "close", | 624 | "close", |
| 624 | "connect", | 625 | "connect", |
| 625 | "dirty", | 626 | "dirty", |
| 627 | "getfamily", | ||
| 626 | "getfd", | 628 | "getfd", |
| 629 | "getoption", | ||
| 627 | "getpeername", | 630 | "getpeername", |
| 628 | "getsockname", | 631 | "getsockname", |
| 629 | "getstats", | 632 | "getstats", |
| @@ -637,13 +640,16 @@ test_methods(socket.tcp(), { | |||
| 637 | "setsockname", | 640 | "setsockname", |
| 638 | "settimeout", | 641 | "settimeout", |
| 639 | "shutdown", | 642 | "shutdown", |
| 640 | }) | 643 | } |
| 644 | test_methods(socket.tcp(), tcp_methods) | ||
| 645 | test_methods(socket.tcp6(), tcp_methods) | ||
| 641 | 646 | ||
| 642 | test_methods(socket.udp(), { | 647 | local udp_methods = { |
| 643 | "close", | 648 | "close", |
| 644 | "getpeername", | ||
| 645 | "dirty", | 649 | "dirty", |
| 650 | "getfamily", | ||
| 646 | "getfd", | 651 | "getfd", |
| 652 | "getoption", | ||
| 647 | "getpeername", | 653 | "getpeername", |
| 648 | "getsockname", | 654 | "getsockname", |
| 649 | "receive", | 655 | "receive", |
| @@ -655,7 +661,9 @@ test_methods(socket.udp(), { | |||
| 655 | "setpeername", | 661 | "setpeername", |
| 656 | "setsockname", | 662 | "setsockname", |
| 657 | "settimeout" | 663 | "settimeout" |
| 658 | }) | 664 | } |
| 665 | test_methods(socket.udp(), udp_methods) | ||
| 666 | test_methods(socket.udp6(), udp_methods) | ||
| 659 | 667 | ||
| 660 | test("partial receive") | 668 | test("partial receive") |
| 661 | test_partialrecv() | 669 | test_partialrecv() |
diff --git a/test/testsrvr.lua b/test/testsrvr.lua index ff31442..72b93ab 100644 --- a/test/testsrvr.lua +++ b/test/testsrvr.lua | |||
| @@ -15,6 +15,6 @@ while 1 do | |||
| 15 | assert(command, emsg) | 15 | assert(command, emsg) |
| 16 | assert(control:send(ack)); | 16 | assert(control:send(ack)); |
| 17 | print(command); | 17 | print(command); |
| 18 | (load(command))(); | 18 | ((loadstring or load)(command))(); |
| 19 | end | 19 | end |
| 20 | end | 20 | end |
