mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-07-13 06:04:31 +02:00
Worked on the manual.
Implemented stuffing (needs test) Added cddb and qp examples.
This commit is contained in:
@ -181,6 +181,19 @@ local function compare_b64test()
|
||||
compare(b64test, db64test)
|
||||
end
|
||||
|
||||
local function identity_test()
|
||||
local chain = socket.mime.chain(
|
||||
socket.mime.encode("quoted-printable"),
|
||||
socket.mime.encode("base64"),
|
||||
socket.mime.decode("base64"),
|
||||
socket.mime.decode("quoted-printable")
|
||||
)
|
||||
transform(b64test, eb64test, chain)
|
||||
compare(b64test, eb64test)
|
||||
os.remove(eb64test)
|
||||
end
|
||||
|
||||
|
||||
local function padcheck(original, encoded)
|
||||
local e = (socket.mime.b64(original))
|
||||
local d = (socket.mime.unb64(encoded))
|
||||
@ -233,4 +246,6 @@ compare_b64test()
|
||||
cleanup_b64test()
|
||||
padding_b64test()
|
||||
|
||||
identity_test()
|
||||
|
||||
print(string.format("done in %.2fs", socket.time() - t))
|
||||
|
Reference in New Issue
Block a user