File: stufftest.lua

package info (click to toggle)
luasocket 3.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,264 kB
  • sloc: ansic: 4,845; makefile: 337; sh: 116
file content (21 lines) | stat: -rw-r--r-- 529 bytes parent folder | download | duplicates (13)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
local mime = require("mime")

function test_dot(original, right)
    local result, n = mime.dot(2, original)
    assert(result == right, "->" .. result .. "<-")
    print("ok")
end

function test_stuff(original, right)
    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..")