Porting to LUA 5.0 final
This commit is contained in:
parent
c1ef3e7103
commit
0f6c8d50a9
32 changed files with 1539 additions and 1128 deletions
|
@ -1,5 +1,5 @@
|
|||
-- load tftpclnt.lua
|
||||
dofile("tftpclnt.lua")
|
||||
dofile("tftp.lua")
|
||||
|
||||
-- needs tftp server running on localhost, with root pointing to
|
||||
-- a directory with index.html in it
|
||||
|
@ -13,11 +13,8 @@ function readfile(file)
|
|||
end
|
||||
|
||||
host = host or "localhost"
|
||||
print("downloading")
|
||||
err = tftp_get(host, 69, "index.html", "index.got")
|
||||
retrieved, err = socket.tftp.get("tftp://" .. host .."/index.html")
|
||||
assert(not err, err)
|
||||
original = readfile("test/index.html")
|
||||
retrieved = readfile("index.got")
|
||||
os.remove("index.got")
|
||||
assert(original == retrieved, "files differ!")
|
||||
print("passed")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue