forked from TrueCloudLab/restic
Correct backend test for len = 0
This commit is contained in:
parent
8a5034d289
commit
548d4eed95
1 changed files with 7 additions and 1 deletions
|
@ -249,7 +249,13 @@ func TestLoad(t testing.TB) {
|
|||
continue
|
||||
}
|
||||
|
||||
if l <= len(d) && len(buf) != l {
|
||||
if l == 0 && len(buf) != len(d) {
|
||||
t.Errorf("Load(%d, %d) wrong number of bytes read: want %d, got %d", l, o, len(d), len(buf))
|
||||
rd.Close()
|
||||
continue
|
||||
}
|
||||
|
||||
if l > 0 && l <= len(d) && len(buf) != l {
|
||||
t.Errorf("Load(%d, %d) wrong number of bytes read: want %d, got %d", l, o, l, len(buf))
|
||||
rd.Close()
|
||||
continue
|
||||
|
|
Loading…
Reference in a new issue