Skip to content

Commit a754d29

Browse files
committed
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 <[email protected]> Run-TryBot: Brad Fitzpatrick <[email protected]>
1 parent ba0bab7 commit a754d29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cmd/compile/internal/syntax/parser_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ func walkDirs(t *testing.T, dir string, action func(string)) {
9696
}
9797
} else if fi.IsDir() && fi.Name() != "testdata" {
9898
path := filepath.Join(dir, fi.Name())
99-
if !strings.HasSuffix(path, "/test") {
99+
if !strings.HasSuffix(path, string(filepath.Separator)+"test") {
100100
dirs = append(dirs, path)
101101
}
102102
}

0 commit comments

Comments
 (0)