mirror of
https://github.com/restic/restic.git
synced 2026-11-19 04:05:21 +00:00
Correct backend test for len = 0
This commit is contained in:
1 parent
8a5034d289
commit
548d4eed95
1 file changed
+7
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user