mirror of
https://github.com/octoleo/restic.git
synced 2024-11-26 14:56:29 +00:00
Correct backend test for len = 0
This commit is contained in:
parent
8a5034d289
commit
548d4eed95
@ -249,7 +249,13 @@ func TestLoad(t testing.TB) {
|
|||||||
continue
|
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))
|
t.Errorf("Load(%d, %d) wrong number of bytes read: want %d, got %d", l, o, l, len(buf))
|
||||||
rd.Close()
|
rd.Close()
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user