Implemented safe exceptions. This looks preeety good.
This commit is contained in:
parent
62799a416d
commit
ac4aac0909
11 changed files with 273 additions and 178 deletions
|
@ -86,16 +86,6 @@ back, err = socket.ftp.get {
|
|||
}
|
||||
check(not err and back == index, err)
|
||||
|
||||
io.write("testing home directory listing: ")
|
||||
expected = capture("ls -F /var/ftp | grep -v /")
|
||||
back, err = socket.ftp.get("ftp://localhost/")
|
||||
check(back and similar(back, expected), nil, err)
|
||||
|
||||
io.write("testing directory listing: ")
|
||||
expected = capture("ls -F /var/ftp/pub | grep -v /")
|
||||
back, err = socket.ftp.get("ftp://localhost/pub;type=d")
|
||||
check(similar(back, expected))
|
||||
|
||||
io.write("testing upload denial: ")
|
||||
ret, err = socket.ftp.put("ftp://localhost/index.up.html;type=a", index)
|
||||
check(err, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue