From bcc0c2a9f0be2ca796ef5206a78e283fe15e6186 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Tue, 16 Mar 2004 06:42:53 +0000 Subject: New filter scheme. ltn12 and mime updated. smtp/ftp broken. --- test/stufftest.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/stufftest.lua (limited to 'test/stufftest.lua') diff --git a/test/stufftest.lua b/test/stufftest.lua new file mode 100644 index 0000000..5eb8005 --- /dev/null +++ b/test/stufftest.lua @@ -0,0 +1,19 @@ +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..") -- cgit v1.2.3-55-g6feb