Commit a754d299 authored by Robert Griesemer's avatar Robert Griesemer

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/+/203889Reviewed-by: default avatarBryan C. Mills <bcmills@google.com>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
parent ba0bab7b
...@@ -96,7 +96,7 @@ func walkDirs(t *testing.T, dir string, action func(string)) { ...@@ -96,7 +96,7 @@ func walkDirs(t *testing.T, dir string, action func(string)) {
} }
} else if fi.IsDir() && fi.Name() != "testdata" { } else if fi.IsDir() && fi.Name() != "testdata" {
path := filepath.Join(dir, fi.Name()) path := filepath.Join(dir, fi.Name())
if !strings.HasSuffix(path, "/test") { if !strings.HasSuffix(path, string(filepath.Separator)+"test") {
dirs = append(dirs, path) dirs = append(dirs, path)
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment