diff options
| author | Diego Nehab <diego@impa.br> | 2013-06-12 21:45:15 +0800 |
|---|---|---|
| committer | Diego Nehab <diego@impa.br> | 2013-06-12 21:45:15 +0800 |
| commit | 7cad902bb77ab5052a7dd5560dd76e9dbaac5002 (patch) | |
| tree | f6503d27ff46c7498531aec7b2ed9e76bdee146a | |
| parent | b34386ca5cee86ccb380eee4b40388381d59bcc1 (diff) | |
| download | luasocket-7cad902bb77ab5052a7dd5560dd76e9dbaac5002.tar.gz luasocket-7cad902bb77ab5052a7dd5560dd76e9dbaac5002.tar.bz2 luasocket-7cad902bb77ab5052a7dd5560dd76e9dbaac5002.zip | |
Fix makefile and test_socket_error.lua
| -rw-r--r-- | makefile.dist | 6 | ||||
| -rw-r--r-- | src/makefile | 2 | ||||
| -rw-r--r-- | test/test_socket_error.lua | 8 |
3 files changed, 12 insertions, 4 deletions
diff --git a/makefile.dist b/makefile.dist index 2c6137b..799cd21 100644 --- a/makefile.dist +++ b/makefile.dist | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | #-------------------------------------------------------------------------- | 1 | #-------------------------------------------------------------------------- |
| 2 | # Distribution makefile | 2 | # Distribution makefile |
| 3 | #-------------------------------------------------------------------------- | 3 | #-------------------------------------------------------------------------- |
| 4 | DIST = luasocket-2.1-rc1 | 4 | DIST = luasocket-3.0-rc1 |
| 5 | 5 | ||
| 6 | TEST = \ | 6 | TEST = \ |
| 7 | test/README \ | 7 | test/README \ |
| @@ -83,6 +83,10 @@ SRC = \ | |||
| 83 | MAKE = \ | 83 | MAKE = \ |
| 84 | makefile \ | 84 | makefile \ |
| 85 | luasocket.sln \ | 85 | luasocket.sln \ |
| 86 | Lua51.props \ | ||
| 87 | Lua52.props \ | ||
| 88 | socket.vcproj.filters \ | ||
| 89 | mime.vcproj.filters \ | ||
| 86 | socket.vcproj \ | 90 | socket.vcproj \ |
| 87 | mime.vcproj | 91 | mime.vcproj |
| 88 | 92 | ||
diff --git a/src/makefile b/src/makefile index 50d5cc1..c24e61b 100644 --- a/src/makefile +++ b/src/makefile | |||
| @@ -135,7 +135,7 @@ DEF_macosx= -DLUASOCKET_$(DEBUG) -DUNIX_HAS_SUN_LEN -DLUA_$(COMPAT)_MODULE \ | |||
| 135 | -DMIME_API='__attribute__((visibility("default")))' | 135 | -DMIME_API='__attribute__((visibility("default")))' |
| 136 | CFLAGS_macosx= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \ | 136 | CFLAGS_macosx= -I$(LUAINC) $(DEF) -pedantic -Wall -O2 -fno-common \ |
| 137 | -fvisibility=hidden | 137 | -fvisibility=hidden |
| 138 | LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o | 138 | LDFLAGS_macosx= -bundle -undefined dynamic_lookup -o |
| 139 | LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc | 139 | LD_macosx= export MACOSX_DEPLOYMENT_TARGET="10.3"; gcc |
| 140 | SOCKET_macosx=usocket.o | 140 | SOCKET_macosx=usocket.o |
| 141 | 141 | ||
diff --git a/test/test_socket_error.lua b/test/test_socket_error.lua index 9bd0bc7..bda6408 100644 --- a/test/test_socket_error.lua +++ b/test/test_socket_error.lua | |||
| @@ -14,8 +14,12 @@ assert('timeout' == err) | |||
| 14 | for i = 1, 10 do | 14 | for i = 1, 10 do |
| 15 | -- select pass even if socket has error | 15 | -- select pass even if socket has error |
| 16 | local _, rec, err = socket.select(nil, {sock}, 1) | 16 | local _, rec, err = socket.select(nil, {sock}, 1) |
| 17 | assert('timeout' == err) | 17 | local _, ss = next(rec) |
| 18 | assert(not next(rec)) | 18 | if ss then |
| 19 | assert(ss == sock) | ||
| 20 | else | ||
| 21 | assert('timeout' == err, 'unexpected error :' .. tostring(err)) | ||
| 22 | end | ||
| 19 | err = sock:getoption("error") -- i get 'connection refused' on WinXP | 23 | err = sock:getoption("error") -- i get 'connection refused' on WinXP |
| 20 | if err then | 24 | if err then |
| 21 | print("Passed! Error is '" .. err .. "'.") | 25 | print("Passed! Error is '" .. err .. "'.") |
