aboutsummaryrefslogtreecommitdiff
path: root/test/smtptest.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/smtptest.lua')
-rw-r--r--test/smtptest.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/smtptest.lua b/test/smtptest.lua
index 27ba400..09bf634 100644
--- a/test/smtptest.lua
+++ b/test/smtptest.lua
@@ -11,7 +11,7 @@ local files = {
11 "/var/spool/mail/luasock3", 11 "/var/spool/mail/luasock3",
12} 12}
13 13
14local t = socket._time() 14local t = socket.time()
15local err 15local err
16 16
17dofile("mbox.lua") 17dofile("mbox.lua")
@@ -106,7 +106,7 @@ local insert = function(sent, message)
106end 106end
107 107
108local mark = function() 108local mark = function()
109 local time = socket._time() 109 local time = socket.time()
110 return { time = time } 110 return { time = time }
111end 111end
112 112
@@ -116,11 +116,11 @@ local wait = function(sentinel, n)
116 while 1 do 116 while 1 do
117 local mbox = parse(get()) 117 local mbox = parse(get())
118 if n == table.getn(mbox) then break end 118 if n == table.getn(mbox) then break end
119 if socket._time() - sentinel.time > 50 then 119 if socket.time() - sentinel.time > 50 then
120 to = 1 120 to = 1
121 break 121 break
122 end 122 end
123 socket._sleep(1) 123 socket.sleep(1)
124 io.write(".") 124 io.write(".")
125 io.stdout:flush() 125 io.stdout:flush()
126 end 126 end
@@ -256,4 +256,4 @@ for i = 1, table.getn(mbox) do
256end 256end
257 257
258print("passed all tests") 258print("passed all tests")
259print(string.format("done in %.2fs", socket._time() - t)) 259print(string.format("done in %.2fs", socket.time() - t))