mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 01:44:41 +01:00
build: fix tests on go1.15
go1.15 introduced a stricter policy for what you can convert with `string()` and now `go vet` warns if you try to do `string(int)`. See: https://github.com/golang/go/issues/32479
This commit is contained in:
parent
101f82c6b3
commit
aa93b39d9b
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user