luasocket/test/stufftest.lua
Diego Nehab bcc0c2a9f0 New filter scheme.
ltn12 and mime updated.
smtp/ftp broken.
2004-03-16 06:42:53 +00:00

20 lines
513 B
Lua

function test_dot(original, right)
local result, n = socket.smtp.dot(2, original)
assert(result == right, "->" .. result .. "<-")
print("ok")
end
function test_stuff(original, right)
local result, n = socket.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..")