diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2001-09-26 20:29:18 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2001-09-26 20:29:18 +0000 |
commit | 4f27c376e9e9aac413ad7b30b683ce08ba16fd1e (patch) | |
tree | 37324aa10dad11aa11196627acf047b628f7402b | |
parent | 36b07d5fd0fe611653004d6fc8ffbc383a2a04de (diff) | |
download | luasocket-4f27c376e9e9aac413ad7b30b683ce08ba16fd1e.tar.gz luasocket-4f27c376e9e9aac413ad7b30b683ce08ba16fd1e.tar.bz2 luasocket-4f27c376e9e9aac413ad7b30b683ce08ba16fd1e.zip |
added wrong scheme test
-rw-r--r-- | test/httptest.lua | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/httptest.lua b/test/httptest.lua index 0b61729..86cb8af 100644 --- a/test/httptest.lua +++ b/test/httptest.lua | |||
@@ -278,6 +278,18 @@ ignore = { | |||
278 | } | 278 | } |
279 | check_request(request, expect, ignore) | 279 | check_request(request, expect, ignore) |
280 | 280 | ||
281 | write("testing wrong scheme: ") | ||
282 | request = { | ||
283 | url = "wrong://" .. host .. cgiprefix .. "/cat", | ||
284 | method = "GET" | ||
285 | } | ||
286 | expect = { | ||
287 | error = "unknown scheme 'wrong'" | ||
288 | } | ||
289 | ignore = { | ||
290 | } | ||
291 | check_request(request, expect, ignore) | ||
292 | |||
281 | local body | 293 | local body |
282 | write("testing simple get function: ") | 294 | write("testing simple get function: ") |
283 | body = HTTP.get("http://" .. host .. prefix .. "/index.html") | 295 | body = HTTP.get("http://" .. host .. prefix .. "/index.html") |