2
2
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:
Alexander Neumann 2017-04-26 20:47:15 +02:00
parent 8a5034d289
commit 548d4eed95

View File

@ -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