diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2006-04-03 03:10:56 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2006-04-03 03:10:56 +0000 |
commit | e9d477aba3bbc084c0a7872e4eaf725e2689e4a6 (patch) | |
tree | 7f6a514fab405c4de2bb983f601af2dbb3cfdc5d /test | |
parent | 71213595260923f9d7cc7d41bb8b7b6227c1da01 (diff) | |
download | luasocket-e9d477aba3bbc084c0a7872e4eaf725e2689e4a6.tar.gz luasocket-e9d477aba3bbc084c0a7872e4eaf725e2689e4a6.tar.bz2 luasocket-e9d477aba3bbc084c0a7872e4eaf725e2689e4a6.zip |
Final patches...
Diffstat (limited to 'test')
-rw-r--r-- | test/auth/.htaccess | 2 | ||||
-rw-r--r-- | test/auth/.htpasswd | 2 | ||||
-rw-r--r-- | test/httptest.lua | 17 | ||||
-rw-r--r-- | test/testmesg.lua | 7 |
4 files changed, 22 insertions, 6 deletions
diff --git a/test/auth/.htaccess b/test/auth/.htaccess index 31e1123..b9f100e 100644 --- a/test/auth/.htaccess +++ b/test/auth/.htaccess | |||
@@ -1,4 +1,4 @@ | |||
1 | AuthName "Test Realm" | 1 | AuthName "Test Realm" |
2 | AuthType Basic | 2 | AuthType Basic |
3 | AuthUserFile /Users/diego/tec/luasocket/test/auth/.htpasswd | 3 | AuthUserFile /home/diego/tec/luasocket/test/auth/.htpasswd |
4 | require valid-user | 4 | require valid-user |
diff --git a/test/auth/.htpasswd b/test/auth/.htpasswd index 824bac9..fd9002b 100644 --- a/test/auth/.htpasswd +++ b/test/auth/.htpasswd | |||
@@ -1 +1 @@ | |||
luasocket:JFMQjUyOPu3yk | luasocket:l8n2npozPB.sQ | ||
diff --git a/test/httptest.lua b/test/httptest.lua index c05b4cc..92528b2 100644 --- a/test/httptest.lua +++ b/test/httptest.lua | |||
@@ -22,7 +22,8 @@ http.TIMEOUT = 10 | |||
22 | 22 | ||
23 | local t = socket.gettime() | 23 | local t = socket.gettime() |
24 | 24 | ||
25 | host = host or "diego.student.princeton.edu" | 25 | --host = host or "diego.student.princeton.edu" |
26 | host = host or "dell-diego" | ||
26 | proxy = proxy or "http://localhost:3128" | 27 | proxy = proxy or "http://localhost:3128" |
27 | prefix = prefix or "/luasocket-test" | 28 | prefix = prefix or "/luasocket-test" |
28 | cgiprefix = cgiprefix or "/luasocket-test-cgi" | 29 | cgiprefix = cgiprefix or "/luasocket-test-cgi" |
@@ -125,6 +126,20 @@ assert(r == nil and e == re, tostring(r) ..", " .. tostring(re) .. | |||
125 | " vs " .. tostring(e)) | 126 | " vs " .. tostring(e)) |
126 | print("ok") | 127 | print("ok") |
127 | 128 | ||
129 | io.write("testing invalid empty port: ") | ||
130 | request = { | ||
131 | url = "http://" .. host .. ":" .. prefix .. "/index.html" | ||
132 | } | ||
133 | expect = { | ||
134 | body = index, | ||
135 | code = 200 | ||
136 | } | ||
137 | ignore = { | ||
138 | status = 1, | ||
139 | headers = 1 | ||
140 | } | ||
141 | check_request(request, expect, ignore) | ||
142 | |||
128 | ------------------------------------------------------------------------ | 143 | ------------------------------------------------------------------------ |
129 | io.write("testing post method: ") | 144 | io.write("testing post method: ") |
130 | -- wanted to test chunked post, but apache doesn't support it... | 145 | -- wanted to test chunked post, but apache doesn't support it... |
diff --git a/test/testmesg.lua b/test/testmesg.lua index 5bec026..ab85c93 100644 --- a/test/testmesg.lua +++ b/test/testmesg.lua | |||
@@ -83,9 +83,10 @@ r, e = smtp.send{ | |||
83 | "<diego@princeton.edu>" }, | 83 | "<diego@princeton.edu>" }, |
84 | from = "<diego@princeton.edu>", | 84 | from = "<diego@princeton.edu>", |
85 | source = ltn12.source.chain(source, filter), | 85 | source = ltn12.source.chain(source, filter), |
86 | --server = "mail.cs.princeton.edu" | 86 | server = "mail.cs.princeton.edu", |
87 | server = "localhost", | 87 | --server = "localhost", |
88 | port = 2525 | 88 | --port = 2525 |
89 | port = 25 | ||
89 | } | 90 | } |
90 | 91 | ||
91 | print(r, e) | 92 | print(r, e) |