aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-17 23:08:56 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-17 23:08:56 +0000
commit07dda08c5d25dca0f8e79b80998559544aa7c398 (patch)
tree7501fff7707f67c24634256818b0336a8a1853ac /test
parent597a062b1bc38488df1363995eece8a9f19c7111 (diff)
downloadluasocket-07dda08c5d25dca0f8e79b80998559544aa7c398.tar.gz
luasocket-07dda08c5d25dca0f8e79b80998559544aa7c398.tar.bz2
luasocket-07dda08c5d25dca0f8e79b80998559544aa7c398.zip
Changed the return of the send function...
Diffstat (limited to 'test')
-rw-r--r--test/testclnt.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/testclnt.lua b/test/testclnt.lua
index da6b2e8..b295cf3 100644
--- a/test/testclnt.lua
+++ b/test/testclnt.lua
@@ -225,7 +225,7 @@ function test_totaltimeoutsend(len, tm, sl)
225 ]], 2*tm, len, sl, sl, len)) 225 ]], 2*tm, len, sl, sl, len))
226 data:settimeout(tm, "total") 226 data:settimeout(tm, "total")
227 str = string.rep("a", 2*len) 227 str = string.rep("a", 2*len)
228 total, err, elapsed = data:send(str) 228 total, err, partial, elapsed = data:send(str)
229 check_timeout(tm, sl, elapsed, err, "send", "total", 229 check_timeout(tm, sl, elapsed, err, "send", "total",
230 total == 2*len) 230 total == 2*len)
231end 231end
@@ -265,7 +265,7 @@ function test_blockingtimeoutsend(len, tm, sl)
265 ]], 2*tm, len, sl, sl, len)) 265 ]], 2*tm, len, sl, sl, len))
266 data:settimeout(tm) 266 data:settimeout(tm)
267 str = string.rep("a", 2*len) 267 str = string.rep("a", 2*len)
268 total, err, elapsed = data:send(str) 268 total, err, partial, elapsed = data:send(str)
269 check_timeout(tm, sl, elapsed, err, "send", "blocking", 269 check_timeout(tm, sl, elapsed, err, "send", "blocking",
270 total == 2*len) 270 total == 2*len)
271end 271end
@@ -326,13 +326,13 @@ function test_closed()
326 data:close() 326 data:close()
327 data = nil 327 data = nil
328 ]] 328 ]]
329 total, err = data:send(string.rep("ugauga", 100000)) 329 total, err, partial = data:send(string.rep("ugauga", 100000))
330 if not err then 330 if not err then
331 pass("failed: output buffer is at least %d bytes long!", total) 331 pass("failed: output buffer is at least %d bytes long!", total)
332 elseif err ~= "closed" then 332 elseif err ~= "closed" then
333 fail("got '"..err.."' instead of 'closed'.") 333 fail("got '"..err.."' instead of 'closed'.")
334 else 334 else
335 pass("graceful 'closed' received after %d bytes were sent", total) 335 pass("graceful 'closed' received after %d bytes were sent", partial)
336 end 336 end
337end 337end
338 338