diff options
Diffstat (limited to 'test/utestclnt.lua')
-rw-r--r-- | test/utestclnt.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/utestclnt.lua b/test/utestclnt.lua index 01f55e5..34a0718 100644 --- a/test/utestclnt.lua +++ b/test/utestclnt.lua | |||
@@ -1,7 +1,7 @@ | |||
1 | require"socket" | 1 | local socket = require"socket" |
2 | local socket = require"socket.unix" | 2 | socket.unix = require"socket.unix" |
3 | 3 | ||
4 | host = "luasocket" | 4 | host = host or "luasocket" |
5 | 5 | ||
6 | function pass(...) | 6 | function pass(...) |
7 | local s = string.format(...) | 7 | local s = string.format(...) |
@@ -82,7 +82,7 @@ function check_timeout(tm, sl, elapsed, err, opp, mode, alldone) | |||
82 | end | 82 | end |
83 | end | 83 | end |
84 | 84 | ||
85 | if not socket.DEBUG then | 85 | if not socket._DEBUG then |
86 | fail("Please define LUASOCKET_DEBUG and recompile LuaSocket") | 86 | fail("Please define LUASOCKET_DEBUG and recompile LuaSocket") |
87 | end | 87 | end |
88 | 88 | ||
@@ -115,7 +115,7 @@ else pass("connected!") end | |||
115 | 115 | ||
116 | ------------------------------------------------------------------------ | 116 | ------------------------------------------------------------------------ |
117 | function test_methods(sock, methods) | 117 | function test_methods(sock, methods) |
118 | for _, v in methods do | 118 | for _, v in pairs(methods) do |
119 | if type(sock[v]) ~= "function" then | 119 | if type(sock[v]) ~= "function" then |
120 | fail(sock.class .. " method '" .. v .. "' not registered") | 120 | fail(sock.class .. " method '" .. v .. "' not registered") |
121 | end | 121 | end |