diff options
author | Robert Griesemer <gri@golang.org> | 2019-10-28 16:55:06 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2019-10-29 03:53:40 +0000 |
commit | a754d2993db1771ca3903d0a5d0e3add1883cf9b (patch) | |
tree | 5e7a2209c857aed74447ccba4f201adfdc583a8a /src/cmd/compile/internal/syntax | |
parent | ba0bab7b4fda1498f2ace58b9d38f0fb8c748f53 (diff) | |
download | go-a754d2993db1771ca3903d0a5d0e3add1883cf9b.tar.gz go-a754d2993db1771ca3903d0a5d0e3add1883cf9b.zip |
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>
Diffstat (limited to 'src/cmd/compile/internal/syntax')
-rw-r--r-- | src/cmd/compile/internal/syntax/parser_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/syntax/parser_test.go b/src/cmd/compile/internal/syntax/parser_test.go index 3cf55defc7..673339d667 100644 --- a/src/cmd/compile/internal/syntax/parser_test.go +++ b/src/cmd/compile/internal/syntax/parser_test.go @@ -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) } } |