aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2005-06-12 22:02:21 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2005-06-12 22:02:21 +0000
commit8b114f3bf4ccea3b065551fa94649a9e45935b5b (patch)
tree06f2faa7e896e9434ba89ec68445ea56e6c8c6dc /test
parentb22f6f3830515a57a8776e7489b3e2d434abd12f (diff)
downloadluasocket-8b114f3bf4ccea3b065551fa94649a9e45935b5b.tar.gz
luasocket-8b114f3bf4ccea3b065551fa94649a9e45935b5b.tar.bz2
luasocket-8b114f3bf4ccea3b065551fa94649a9e45935b5b.zip
Stupid bug in http.lua.
Diffstat (limited to 'test')
-rw-r--r--test/dicttest.lua2
-rw-r--r--test/httptest.lua4
-rw-r--r--test/smtptest.lua2
-rw-r--r--test/urltest.lua4
4 files changed, 6 insertions, 6 deletions
diff --git a/test/dicttest.lua b/test/dicttest.lua
index 7ac7811..9ab9c41 100644
--- a/test/dicttest.lua
+++ b/test/dicttest.lua
@@ -1,3 +1,3 @@
1local dict = require"socket.dict" 1local dict = require"socket.dict"
2 2
3for i,v in dict.get("dict://localhost/d:teste") do print(v) end 3for i,v in pairs(dict.get("dict://localhost/d:teste")) do print(v) end
diff --git a/test/httptest.lua b/test/httptest.lua
index 2335fcb..963b947 100644
--- a/test/httptest.lua
+++ b/test/httptest.lua
@@ -32,7 +32,7 @@ index_file = "test/index.html"
32index = readfile(index_file) 32index = readfile(index_file)
33 33
34local check_result = function(response, expect, ignore) 34local check_result = function(response, expect, ignore)
35 for i,v in response do 35 for i,v in pairs(response) do
36 if not ignore[i] then 36 if not ignore[i] then
37 if v ~= expect[i] then 37 if v ~= expect[i] then
38 local f = io.open("err", "w") 38 local f = io.open("err", "w")
@@ -42,7 +42,7 @@ local check_result = function(response, expect, ignore)
42 end 42 end
43 end 43 end
44 end 44 end
45 for i,v in expect do 45 for i,v in pairs(expect) do
46 if not ignore[i] then 46 if not ignore[i] then
47 if v ~= response[i] then 47 if v ~= response[i] then
48 local f = io.open("err", "w") 48 local f = io.open("err", "w")
diff --git a/test/smtptest.lua b/test/smtptest.lua
index e812737..d0c938c 100644
--- a/test/smtptest.lua
+++ b/test/smtptest.lua
@@ -70,7 +70,7 @@ end
70local check_headers = function(sent, got) 70local check_headers = function(sent, got)
71 sent = sent or {} 71 sent = sent or {}
72 got = got or {} 72 got = got or {}
73 for i,v in sent do 73 for i,v in pairs(sent) do
74 if not similar(v, got[i]) then fail("header " .. v .. "failed!") end 74 if not similar(v, got[i]) then fail("header " .. v .. "failed!") end
75 end 75 end
76end 76end
diff --git a/test/urltest.lua b/test/urltest.lua
index 570b52e..ae54db9 100644
--- a/test/urltest.lua
+++ b/test/urltest.lua
@@ -75,7 +75,7 @@ local check_parse_url = function(gaba)
75 if v ~= parsed[i] then 75 if v ~= parsed[i] then
76 io.write("parse: In test for '", url, "' expected ", i, " = '", 76 io.write("parse: In test for '", url, "' expected ", i, " = '",
77 v, "' but got '", tostring(parsed[i]), "'\n") 77 v, "' but got '", tostring(parsed[i]), "'\n")
78 for i,v in parsed do print(i,v) end 78 for i,v in pairs(parsed) do print(i,v) end
79 exit() 79 exit()
80 end 80 end
81 end 81 end
@@ -83,7 +83,7 @@ local check_parse_url = function(gaba)
83 if v ~= gaba[i] then 83 if v ~= gaba[i] then
84 io.write("parse: In test for '", url, "' expected ", i, " = '", 84 io.write("parse: In test for '", url, "' expected ", i, " = '",
85 tostring(gaba[i]), "' but got '", v, "'\n") 85 tostring(gaba[i]), "' but got '", v, "'\n")
86 for i,v in parsed do print(i,v) end 86 for i,v in pairs(parsed) do print(i,v) end
87 exit() 87 exit()
88 end 88 end
89 end 89 end