diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-07-26 05:17:37 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2004-07-26 05:17:37 +0000 |
commit | 911e8d7e7f63e6e90814e82955bfaf26328afb19 (patch) | |
tree | 575a916f4616a0f865bff9928faa9be67a8c867e /test/httptest.lua | |
parent | d914007507a6a4ad3489cca19652af403fef7074 (diff) | |
download | luasocket-911e8d7e7f63e6e90814e82955bfaf26328afb19.tar.gz luasocket-911e8d7e7f63e6e90814e82955bfaf26328afb19.tar.bz2 luasocket-911e8d7e7f63e6e90814e82955bfaf26328afb19.zip |
Beta2 is out! Total timeout works on Windows.
Diffstat (limited to 'test/httptest.lua')
-rw-r--r-- | test/httptest.lua | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/test/httptest.lua b/test/httptest.lua index 31e8212..ce7a93b 100644 --- a/test/httptest.lua +++ b/test/httptest.lua | |||
@@ -116,6 +116,16 @@ ignore = { | |||
116 | check_request(request, expect, ignore) | 116 | check_request(request, expect, ignore) |
117 | 117 | ||
118 | ------------------------------------------------------------------------ | 118 | ------------------------------------------------------------------------ |
119 | io.write("testing invalid url: ") | ||
120 | local c, e = socket.connect("", 80) | ||
121 | local r, re = http.request{url = host .. prefix} | ||
122 | assert(r == nil and e == re) | ||
123 | r, re = http.request(host .. prefix) | ||
124 | assert(r == nil and e == re, tostring(r) ..", " .. tostring(re) .. | ||
125 | " vs " .. tostring(e)) | ||
126 | print("ok") | ||
127 | |||
128 | ------------------------------------------------------------------------ | ||
119 | io.write("testing post method: ") | 129 | io.write("testing post method: ") |
120 | -- wanted to test chunked post, but apache doesn't support it... | 130 | -- wanted to test chunked post, but apache doesn't support it... |
121 | request = { | 131 | request = { |
@@ -407,15 +417,6 @@ assert(r == nil and e == re) | |||
407 | print("ok") | 417 | print("ok") |
408 | 418 | ||
409 | ------------------------------------------------------------------------ | 419 | ------------------------------------------------------------------------ |
410 | io.write("testing invalid url: ") | ||
411 | local c, e = socket.connect("", 80) | ||
412 | local r, re = http.request{url = host .. prefix} | ||
413 | assert(r == nil and e == re) | ||
414 | r, re = http.request(host .. prefix) | ||
415 | assert(r == nil and e == re) | ||
416 | print("ok") | ||
417 | |||
418 | ------------------------------------------------------------------------ | ||
419 | print("passed all tests") | 420 | print("passed all tests") |
420 | os.remove("err") | 421 | os.remove("err") |
421 | 422 | ||