From e54f78c61cac7b0d7fe1e89d337b9ab06f40bdb0 Mon Sep 17 00:00:00 2001 From: moteus Date: Mon, 27 May 2013 11:25:31 +0400 Subject: Fix. setsockname fails with "*" as host. Add. test_bind.lua --- test/test_bind.lua | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/test_bind.lua (limited to 'test') diff --git a/test/test_bind.lua b/test/test_bind.lua new file mode 100644 index 0000000..93c42d7 --- /dev/null +++ b/test/test_bind.lua @@ -0,0 +1,6 @@ +local socket = require "socket" +local u = socket.udp() assert(u:setsockname("*", 5088)) u:close() +local u = socket.udp() assert(u:setsockname("*", 0)) u:close() +local t = socket.tcp() assert(t:bind("*", 5088)) t:close() +local t = socket.tcp() assert(t:bind("*", 0)) t:close() +print("done!") \ No newline at end of file -- cgit v1.2.3-55-g6feb