diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-17 00:18:48 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-06-17 00:18:48 +0000 |
commit | 80b7acea2eb19f7facddce17733b88cb50a56cea (patch) | |
tree | 3b2354627dd2a178e0a66f3c9ab2181405381aec /test/testclnt.lua | |
parent | 27c8ae30aaef25d537669062d5f7f929eec18032 (diff) | |
download | luasocket-80b7acea2eb19f7facddce17733b88cb50a56cea.tar.gz luasocket-80b7acea2eb19f7facddce17733b88cb50a56cea.tar.bz2 luasocket-80b7acea2eb19f7facddce17733b88cb50a56cea.zip |
Compiled and tested on Windows...
Diffstat (limited to 'test/testclnt.lua')
-rw-r--r-- | test/testclnt.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/testclnt.lua b/test/testclnt.lua index 6735113..da6b2e8 100644 --- a/test/testclnt.lua +++ b/test/testclnt.lua | |||
@@ -339,12 +339,14 @@ end | |||
339 | ------------------------------------------------------------------------ | 339 | ------------------------------------------------------------------------ |
340 | function test_selectbugs() | 340 | function test_selectbugs() |
341 | local r, s, e = socket.select(nil, nil, 0.1) | 341 | local r, s, e = socket.select(nil, nil, 0.1) |
342 | assert(type(r) == "table" and type(s) == "table" and e == "timeout") | 342 | assert(type(r) == "table" and type(s) == "table" and |
343 | (e == "timeout" or e == "error")) | ||
343 | pass("both nil: ok") | 344 | pass("both nil: ok") |
344 | local udp = socket.udp() | 345 | local udp = socket.udp() |
345 | udp:close() | 346 | udp:close() |
346 | r, s, e = socket.select({ udp }, { udp }, 0.1) | 347 | r, s, e = socket.select({ udp }, { udp }, 0.1) |
347 | assert(type(r) == "table" and type(s) == "table" and e == "timeout") | 348 | assert(type(r) == "table" and type(s) == "table" and |
349 | (e == "timeout" or e == "error")) | ||
348 | pass("closed sockets: ok") | 350 | pass("closed sockets: ok") |
349 | e = pcall(socket.select, "wrong", 1, 0.1) | 351 | e = pcall(socket.select, "wrong", 1, 0.1) |
350 | assert(e == false) | 352 | assert(e == false) |