aboutsummaryrefslogtreecommitdiff
path: root/test/tftptest.lua
diff options
context:
space:
mode:
Diffstat (limited to 'test/tftptest.lua')
-rw-r--r--test/tftptest.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/test/tftptest.lua b/test/tftptest.lua
index a435ad4..a478ed8 100644
--- a/test/tftptest.lua
+++ b/test/tftptest.lua
@@ -1,5 +1,5 @@
1-- load tftpclnt.lua 1-- load tftpclnt.lua
2dofile("tftpclnt.lua") 2dofile("tftp.lua")
3 3
4-- needs tftp server running on localhost, with root pointing to 4-- needs tftp server running on localhost, with root pointing to
5-- a directory with index.html in it 5-- a directory with index.html in it
@@ -13,11 +13,8 @@ function readfile(file)
13end 13end
14 14
15host = host or "localhost" 15host = host or "localhost"
16print("downloading") 16retrieved, err = socket.tftp.get("tftp://" .. host .."/index.html")
17err = tftp_get(host, 69, "index.html", "index.got")
18assert(not err, err) 17assert(not err, err)
19original = readfile("test/index.html") 18original = readfile("test/index.html")
20retrieved = readfile("index.got")
21os.remove("index.got")
22assert(original == retrieved, "files differ!") 19assert(original == retrieved, "files differ!")
23print("passed") 20print("passed")