Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

build: fix tests on go1.15

Nick Craig-Woodaa93b39d9b19
diff --git a/fs/asyncreader/asyncreader_test.go b/fs/asyncreader/asyncreader_test.go
index 2a5e06099..4aab06604 100644
--- a/fs/asyncreader/asyncreader_test.go
+++ b/fs/asyncreader/asyncreader_test.go
@@ -146,7 +146,7 @@ func TestAsyncReaderSizes(t *testing.T) {
for i := 0; i < len(texts)-1; i++ {
texts[i] = str + "\n"
all += texts[i]
- str += string(i%26 + 'a')
+ str += string(rune(i)%26 + 'a')
}
texts[len(texts)-1] = all
@@ -185,7 +185,7 @@ func TestAsyncReaderWriteTo(t *testing.T) {
for i := 0; i < len(texts)-1; i++ {
texts[i] = str + "\n"
all += texts[i]
- str += string(i%26 + 'a')
+ str += string(rune(i)%26 + 'a')
}
texts[len(texts)-1] = all
diff --git a/fs/walk/walk_test.go b/fs/walk/walk_test.go
index 373ffe753..e50e9478a 100644
--- a/fs/walk/walk_test.go
+++ b/fs/walk/walk_test.go
@@ -358,7 +358,7 @@ func walkErrors(t *testing.T, expectedErr error) *listDirs {
em := errorMap{}
de := make(fs.DirEntries, 10)
for i := range de {
- path := string('0' + i)
+ path := string('0' + rune(i))
de[i] = mockdir.New(path)
lr[path] = listResult{entries: nil, err: fs.ErrorDirNotFound}
em[path] = fs.ErrorDirNotFound