From 597a062b1bc38488df1363995eece8a9f19c7111 Mon Sep 17 00:00:00 2001 From: Diego Nehab Date: Thu, 17 Jun 2004 21:46:22 +0000 Subject: Almost ready for distribution... --- test/README | 13 +------------ test/ltn12test.lua | 5 ----- test/stufftest.lua | 6 +++--- test/testmesg.lua | 7 +++---- 4 files changed, 7 insertions(+), 24 deletions(-) delete mode 100644 test/ltn12test.lua (limited to 'test') diff --git a/test/README b/test/README index 2502e20..180fa27 100644 --- a/test/README +++ b/test/README @@ -5,19 +5,8 @@ The files provided are: testsrvr.lua -- test server testclnt.lua -- test client - testcmd.lua -- test command definitions -To run the automatic tests on your system, make sure to compile the -library with _DEBUG defined (check makefile) and then open two -terminals. Run 'luasocket testsrvr.lua' on one of them and 'luasocket -testclnt.lua' on the other. The programs should start talking to each -other and report any failure. The tests can also be used as a benchmark. - - urltest.lua -- url.lua test module - codetest.lua -- code.lua test module - concattest.lua -- concat.lua test module - -To run these tests, just run luasocket on them and see the results. +To run these tests, just run lua on the server and then on the client. Good luck, Diego. diff --git a/test/ltn12test.lua b/test/ltn12test.lua deleted file mode 100644 index 04749a5..0000000 --- a/test/ltn12test.lua +++ /dev/null @@ -1,5 +0,0 @@ -a = ltn12.source.file(io.open("luasocket.lua")) -b = ltn12.source.file(io.open("auxiliar.lua")) -c = ltn12.source.cat(a, b) -d = ltn12.sink.file(io.stdout) -socket.try(ltn12.pump.all(c, d)) diff --git a/test/stufftest.lua b/test/stufftest.lua index 6bd1f91..eddf636 100644 --- a/test/stufftest.lua +++ b/test/stufftest.lua @@ -1,13 +1,13 @@ -smtp = require("smtp") +mime = require("mime") function test_dot(original, right) - local result, n = smtp.dot(2, original) + local result, n = mime.dot(2, original) assert(result == right, "->" .. result .. "<-") print("ok") end function test_stuff(original, right) - local result, n = smtp.dot(2, original) + local result, n = mime.dot(2, original) assert(result == right, "->" .. result .. "<-") print("ok") end diff --git a/test/testmesg.lua b/test/testmesg.lua index d43c189..3555031 100644 --- a/test/testmesg.lua +++ b/test/testmesg.lua @@ -50,10 +50,9 @@ source = smtp.message{ -- finally send it r, e = smtp.send{ - rcpt = "", - from = "", - source = source, - server = "mail.cs.princeton.edu" + rcpt = "", + from = "", + source = source } print(r, e) -- cgit v1.2.3-55-g6feb