diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_bind.lua | 6 |
1 files changed, 6 insertions, 0 deletions
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 @@ | |||
1 | local socket = require "socket" | ||
2 | local u = socket.udp() assert(u:setsockname("*", 5088)) u:close() | ||
3 | local u = socket.udp() assert(u:setsockname("*", 0)) u:close() | ||
4 | local t = socket.tcp() assert(t:bind("*", 5088)) t:close() | ||
5 | local t = socket.tcp() assert(t:bind("*", 0)) t:close() | ||
6 | print("done!") \ No newline at end of file | ||