diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-05-25 01:54:13 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2003-05-25 01:54:13 +0000 |
commit | 0f6c8d50a99997ac7829864b1c93362b50f1bbf3 (patch) | |
tree | d0cefe3a05484e65b7b7e79d8cae4a1d2e6d19fb /test/tftptest.lua | |
parent | c1ef3e7103cc652d2004ef1ddc9409b946207f33 (diff) | |
download | luasocket-0f6c8d50a99997ac7829864b1c93362b50f1bbf3.tar.gz luasocket-0f6c8d50a99997ac7829864b1c93362b50f1bbf3.tar.bz2 luasocket-0f6c8d50a99997ac7829864b1c93362b50f1bbf3.zip |
Porting to LUA 5.0 final
Diffstat (limited to 'test/tftptest.lua')
-rw-r--r-- | test/tftptest.lua | 7 |
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 |
2 | dofile("tftpclnt.lua") | 2 | dofile("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) | |||
13 | end | 13 | end |
14 | 14 | ||
15 | host = host or "localhost" | 15 | host = host or "localhost" |
16 | print("downloading") | 16 | retrieved, err = socket.tftp.get("tftp://" .. host .."/index.html") |
17 | err = tftp_get(host, 69, "index.html", "index.got") | ||
18 | assert(not err, err) | 17 | assert(not err, err) |
19 | original = readfile("test/index.html") | 18 | original = readfile("test/index.html") |
20 | retrieved = readfile("index.got") | ||
21 | os.remove("index.got") | ||
22 | assert(original == retrieved, "files differ!") | 19 | assert(original == retrieved, "files differ!") |
23 | print("passed") | 20 | print("passed") |