Working on the manual...
Making better tests for error messages. Changed a few names. Moved gethostname to inet.c.
This commit is contained in:
parent
0c9f420a35
commit
62a4c505e4
21 changed files with 341 additions and 315 deletions
|
@ -12,7 +12,7 @@ socket.http.TIMEOUT = 5
|
|||
|
||||
local t = socket.time()
|
||||
|
||||
host = host or "diego.student.dyn.cs.princeton.edu"
|
||||
host = host or "diego-interface2.student.dyn.CS.Princeton.EDU"
|
||||
proxy = proxy or "http://localhost:3128"
|
||||
prefix = prefix or "/luasocket-test"
|
||||
cgiprefix = cgiprefix or "/luasocket-test-cgi"
|
||||
|
|
|
@ -4,7 +4,7 @@ local qptest = "qptest.bin"
|
|||
local eqptest = "qptest.bin2"
|
||||
local dqptest = "qptest.bin3"
|
||||
|
||||
local b64test = "luasocket.exe"
|
||||
local b64test = "luasocket"
|
||||
local eb64test = "b64test.bin"
|
||||
local db64test = "b64test.bin2"
|
||||
|
||||
|
@ -155,10 +155,10 @@ local function encode_b64test()
|
|||
local e2 = socket.mime.encode("base64")
|
||||
local e3 = socket.mime.encode("base64")
|
||||
local e4 = socket.mime.encode("base64")
|
||||
local sp4 = socket.mime.wrap("character")
|
||||
local sp3 = socket.mime.wrap("character", 59)
|
||||
local sp2 = socket.mime.wrap("character", 30)
|
||||
local sp1 = socket.mime.wrap("character", 27)
|
||||
local sp4 = socket.mime.wrap()
|
||||
local sp3 = socket.mime.wrap(59)
|
||||
local sp2 = socket.mime.wrap("base64", 30)
|
||||
local sp1 = socket.mime.wrap(27)
|
||||
local chain = socket.mime.chain(e1, sp1, e2, sp2, e3, sp3, e4, sp4)
|
||||
transform(b64test, eb64test, chain)
|
||||
end
|
||||
|
|
|
@ -378,7 +378,7 @@ end
|
|||
|
||||
------------------------------------------------------------------------
|
||||
function accept_errors()
|
||||
io.write("not listenning: ")
|
||||
io.write("not listening: ")
|
||||
local d, e = socket.bind("*", 0)
|
||||
assert(d, e);
|
||||
local c, e = socket.tcp();
|
||||
|
@ -392,7 +392,7 @@ function accept_errors()
|
|||
assert(c, e);
|
||||
d:setfd(c:getfd())
|
||||
local r, e = d:accept()
|
||||
assert(not r and e == "not supported", e)
|
||||
assert(not r and e == "not supported" or e == "not listening", e)
|
||||
print("ok")
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue