1
0
mirror of https://github.com/golang/go synced 2024-11-18 09:04:49 -07:00

cmd/compile/internal/syntax: don't hardwire path separator in test

Windows uses '\' not '/'.

Fixes #35175.

Change-Id: Ib3d01dcf148fc0675496d5213f5bcc9cf210a6fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/203889
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Robert Griesemer 2019-10-28 16:55:06 -07:00
parent ba0bab7b4f
commit a754d2993d

View File

@ -96,7 +96,7 @@ func walkDirs(t *testing.T, dir string, action func(string)) {
}
} else if fi.IsDir() && fi.Name() != "testdata" {
path := filepath.Join(dir, fi.Name())
if !strings.HasSuffix(path, "/test") {
if !strings.HasSuffix(path, string(filepath.Separator)+"test") {
dirs = append(dirs, path)
}
}