luasocket/test/stufftest.lua
Diego Nehab d46f7a09a7 Fixed smtp.lua loading.
Adjusted tftp module.
Added some comments.
2004-06-16 01:02:07 +00:00

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..")