diff options
Diffstat (limited to 'test/smtptest.lua')
-rw-r--r-- | test/smtptest.lua | 10 |
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 | ||
14 | local t = socket._time() | 14 | local t = socket.time() |
15 | local err | 15 | local err |
16 | 16 | ||
17 | dofile("mbox.lua") | 17 | dofile("mbox.lua") |
@@ -106,7 +106,7 @@ local insert = function(sent, message) | |||
106 | end | 106 | end |
107 | 107 | ||
108 | local mark = function() | 108 | local mark = function() |
109 | local time = socket._time() | 109 | local time = socket.time() |
110 | return { time = time } | 110 | return { time = time } |
111 | end | 111 | end |
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 | |||
256 | end | 256 | end |
257 | 257 | ||
258 | print("passed all tests") | 258 | print("passed all tests") |
259 | print(string.format("done in %.2fs", socket._time() - t)) | 259 | print(string.format("done in %.2fs", socket.time() - t)) |