Compiles and runs on windows.

This commit is contained in:
Diego Nehab 2004-07-02 18:44:05 +00:00
parent 63807d6476
commit b1a4ad2b19
6 changed files with 292 additions and 251 deletions

View file

@ -437,6 +437,25 @@ function rebind_test()
print("ok: ", e)
end
------------------------------------------------------------------------
function getstats_test()
reconnect()
local t = 0
for i = 1, 25 do
local c = math.random(1, 100)
remote (string.format ([[
str = data:receive(%d)
data:send(str)
]], c))
c:send(string.rep("a", c))
c:receive(c)
local r, s, a = c:getstats()
assert(r == t, "received count failed")
assert(s == t, "sent count failed")
end
print("ok")
end
------------------------------------------------------------------------
test("method registration")
test_methods(socket.tcp(), {
@ -499,6 +518,9 @@ test("accept function: ")
accept_timeout()
accept_errors()
test("getstats test")
getstats_test()
test("character line")
test_asciiline(1)
test_asciiline(17)