mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-11-08 22:38:21 +01:00
d46f7a09a7
Adjusted tftp module. Added some comments.
22 lines
523 B
Lua
22 lines
523 B
Lua
smtp = require("smtp")
|
|
|
|
function test_dot(original, right)
|
|
local result, n = smtp.dot(2, original)
|
|
assert(result == right, "->" .. result .. "<-")
|
|
print("ok")
|
|
end
|
|
|
|
function test_stuff(original, right)
|
|
local result, n = smtp.dot(2, original)
|
|
assert(result == right, "->" .. result .. "<-")
|
|
print("ok")
|
|
end
|
|
|
|
test_dot("abc", "abc")
|
|
test_dot("", "")
|
|
test_dot("\r\n", "\r\n")
|
|
test_dot("\r\n.", "\r\n..")
|
|
test_dot(".\r\n.", "..\r\n..")
|
|
test_dot(".\r\n.", "..\r\n..")
|
|
test_dot("abcd.\r\n.", "abcd.\r\n..")
|