aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-17 21:46:22 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-06-17 21:46:22 +0000
commit597a062b1bc38488df1363995eece8a9f19c7111 (patch)
treeba4ccaa8be98d1100aed63abb9c42c099f2c41bb /test
parenteac26d2c8dafab604ef2e97e504326cfaf1033cf (diff)
downloadluasocket-597a062b1bc38488df1363995eece8a9f19c7111.tar.gz
luasocket-597a062b1bc38488df1363995eece8a9f19c7111.tar.bz2
luasocket-597a062b1bc38488df1363995eece8a9f19c7111.zip
Almost ready for distribution...
Diffstat (limited to 'test')
-rw-r--r--test/README13
-rw-r--r--test/ltn12test.lua5
-rw-r--r--test/stufftest.lua6
-rw-r--r--test/testmesg.lua7
4 files changed, 7 insertions, 24 deletions
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:
5 5
6 testsrvr.lua -- test server 6 testsrvr.lua -- test server
7 testclnt.lua -- test client 7 testclnt.lua -- test client
8 testcmd.lua -- test command definitions
9 8
10To run the automatic tests on your system, make sure to compile the 9To run these tests, just run lua on the server and then on the client.
11library with _DEBUG defined (check makefile) and then open two
12terminals. Run 'luasocket testsrvr.lua' on one of them and 'luasocket
13testclnt.lua' on the other. The programs should start talking to each
14other and report any failure. The tests can also be used as a benchmark.
15
16 urltest.lua -- url.lua test module
17 codetest.lua -- code.lua test module
18 concattest.lua -- concat.lua test module
19
20To run these tests, just run luasocket on them and see the results.
21 10
22Good luck, 11Good luck,
23Diego. 12Diego.
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 @@
1a = ltn12.source.file(io.open("luasocket.lua"))
2b = ltn12.source.file(io.open("auxiliar.lua"))
3c = ltn12.source.cat(a, b)
4d = ltn12.sink.file(io.stdout)
5socket.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 @@
1smtp = require("smtp") 1mime = require("mime")
2 2
3function test_dot(original, right) 3function test_dot(original, right)
4 local result, n = smtp.dot(2, original) 4 local result, n = mime.dot(2, original)
5 assert(result == right, "->" .. result .. "<-") 5 assert(result == right, "->" .. result .. "<-")
6 print("ok") 6 print("ok")
7end 7end
8 8
9function test_stuff(original, right) 9function test_stuff(original, right)
10 local result, n = smtp.dot(2, original) 10 local result, n = mime.dot(2, original)
11 assert(result == right, "->" .. result .. "<-") 11 assert(result == right, "->" .. result .. "<-")
12 print("ok") 12 print("ok")
13end 13end
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{
50 50
51-- finally send it 51-- finally send it
52r, e = smtp.send{ 52r, e = smtp.send{
53 rcpt = "<diego@cs.princeton.edu>", 53 rcpt = "<fulano@tecgraf.puc-rio.br>",
54 from = "<diego@cs.princeton.edu>", 54 from = "<sicrano@tecgraf.puc-rio.br>",
55 source = source, 55 source = source
56 server = "mail.cs.princeton.edu"
57} 56}
58 57
59print(r, e) 58print(r, e)