Initial revision

This commit is contained in:
Diego Nehab 2001-01-25 21:59:39 +00:00
parent 68f51243b3
commit 7096b8df82
6 changed files with 191 additions and 0 deletions

16
test/tftptest.lua Normal file
View file

@ -0,0 +1,16 @@
-- load tftpclng.lua
assert(dofile("../examples/tftpclnt.lua"))
assert(dofile("auxiliar.lua"))
-- needs tftp server running on localhost, with root pointing to
-- /home/i/diego/public/html/luasocket/test
host = host or "localhost"
print("downloading")
err = tftp_get(host, 69, "test/index.html")
assert(not err, err)
original = readfile("/home/i/diego/public/html/luasocket/test/index.html")
retrieved = readfile("index.html")
remove("index.html")
assert(original == retrieved, "files differ!")
print("passed")