Better error handling, new commands.

The code is no safer.
Added Stor(), Rename(), NoOp()
Improved Retr()
Added client tests (requires a ftp server on localhost)
This commit is contained in:
jlaffaye
2011-09-05 23:36:14 +02:00
parent faca79d4ea
commit a87255661d
4 changed files with 204 additions and 44 deletions

View File

@@ -5,7 +5,7 @@ import "testing"
type line struct {
line string
name string
entryType int
entryType EntryType
}
var listTests = []line {
@@ -37,8 +37,8 @@ func TestParseListLine(t *testing.T) {
if entry.Name != lt.name {
t.Errorf("parseListLine(%v).Name = '%v', want '%v'", lt.line, entry.Name, lt.name)
}
if entry.EntryType != lt.entryType {
t.Errorf("parseListLine(%v).EntryType = %v, want %v", lt.line, entry.EntryType, lt.entryType,)
if entry.Type != lt.entryType {
t.Errorf("parseListLine(%v).EntryType = %v, want %v", lt.line, entry.Type, lt.entryType,)
}
}
for _, lt := range listTestsFail {