*: fix tests failing due to path.Join usage

Solution:
Use `file/filepath` package to construct expected path. This package is OS-aware, see https://github.com/golang/go/issues/30616.
This commit is contained in:
AnnaShaleva 2021-11-17 14:14:22 +03:00 committed by Anna Shaleva
parent 6cdb701a9d
commit aefb6f9fee
21 changed files with 118 additions and 116 deletions

View file

@ -10,7 +10,7 @@ import (
"io"
"io/ioutil"
"os"
"path"
"path/filepath"
"strings"
"github.com/nspcc-dev/neo-go/pkg/smartcontract/manifest"
@ -135,7 +135,7 @@ func getBuildInfo(name string, src interface{}) (*buildInfo, error) {
}
for i := range ds {
if !ds[i].IsDir() && strings.HasSuffix(ds[i].Name(), ".go") {
names = append(names, path.Join(name, ds[i].Name()))
names = append(names, filepath.Join(name, ds[i].Name()))
}
}
}