diff options
author | moteus <mimir@newmail.ru> | 2013-05-27 11:25:31 +0400 |
---|---|---|
committer | moteus <mimir@newmail.ru> | 2013-05-27 11:25:31 +0400 |
commit | e54f78c61cac7b0d7fe1e89d337b9ab06f40bdb0 (patch) | |
tree | a0e80fdaa6a6ce9fe38964e7fb49a0aa0b64c7c0 /test | |
parent | 56dbda39ed07faf2c14427797fe104213f734e00 (diff) | |
download | luasocket-e54f78c61cac7b0d7fe1e89d337b9ab06f40bdb0.tar.gz luasocket-e54f78c61cac7b0d7fe1e89d337b9ab06f40bdb0.tar.bz2 luasocket-e54f78c61cac7b0d7fe1e89d337b9ab06f40bdb0.zip |
Fix. setsockname fails with "*" as host.
Add. test_bind.lua
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 | ||