luasocket/test/stufftest.lua

22 lines
529 B
Lua
Raw Permalink Normal View History

2004-06-21 08:07:58 +02:00
local mime = require("mime")
function test_dot(original, right)
2004-06-17 23:46:22 +02:00
local result, n = mime.dot(2, original)
assert(result == right, "->" .. result .. "<-")
print("ok")
end
function test_stuff(original, right)
2004-06-17 23:46:22 +02:00
local result, n = mime.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..")