mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-12-25 12:08:21 +01:00
Fix makefile and test_socket_error.lua
This commit is contained in:
parent
b34386ca5c
commit
7cad902bb7
@ -1,7 +1,7 @@
|
|||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
# Distribution makefile
|
# Distribution makefile
|
||||||
#--------------------------------------------------------------------------
|
#--------------------------------------------------------------------------
|
||||||
DIST = luasocket-2.1-rc1
|
DIST = luasocket-3.0-rc1
|
||||||
|
|
||||||
TEST = \
|
TEST = \
|
||||||
test/README \
|
test/README \
|
||||||
@ -83,6 +83,10 @@ SRC = \
|
|||||||
MAKE = \
|
MAKE = \
|
||||||
makefile \
|
makefile \
|
||||||
luasocket.sln \
|
luasocket.sln \
|
||||||
|
Lua51.props \
|
||||||
|
Lua52.props \
|
||||||
|
socket.vcproj.filters \
|
||||||
|
mime.vcproj.filters \
|
||||||
socket.vcproj \
|
socket.vcproj \
|
||||||
mime.vcproj
|
mime.vcproj
|
||||||
|
|
||||||
|
@ -14,8 +14,12 @@ assert('timeout' == err)
|
|||||||
for i = 1, 10 do
|
for i = 1, 10 do
|
||||||
-- select pass even if socket has error
|
-- select pass even if socket has error
|
||||||
local _, rec, err = socket.select(nil, {sock}, 1)
|
local _, rec, err = socket.select(nil, {sock}, 1)
|
||||||
assert('timeout' == err)
|
local _, ss = next(rec)
|
||||||
assert(not next(rec))
|
if ss then
|
||||||
|
assert(ss == sock)
|
||||||
|
else
|
||||||
|
assert('timeout' == err, 'unexpected error :' .. tostring(err))
|
||||||
|
end
|
||||||
err = sock:getoption("error") -- i get 'connection refused' on WinXP
|
err = sock:getoption("error") -- i get 'connection refused' on WinXP
|
||||||
if err then
|
if err then
|
||||||
print("Passed! Error is '" .. err .. "'.")
|
print("Passed! Error is '" .. err .. "'.")
|
||||||
|
Loading…
Reference in New Issue
Block a user