Skip to content

Commit 012fec3

Browse files
committed
cmd/compile/internal/syntax: don't depend on hardwired $GOROOT name
Fixes #17697. Change-Id: I3c47e139b09bde81566e29a1ac0ec8c58d55a34a Reviewed-on: https://go-review.googlesource.com/32539 Run-TryBot: Robert Griesemer <[email protected]> Reviewed-by: Matthew Dempsky <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent 7c7349c commit 012fec3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ func TestStdLib(t *testing.T) {
4747
defer close(results)
4848
for _, dir := range []string{
4949
runtime.GOROOT(),
50-
//"/Users/gri/src",
5150
} {
5251
walkDirs(t, dir, func(filename string) {
5352
if debug {
@@ -100,7 +99,7 @@ func walkDirs(t *testing.T, dir string, action func(string)) {
10099
}
101100
} else if fi.IsDir() && fi.Name() != "testdata" {
102101
path := filepath.Join(dir, fi.Name())
103-
if !strings.Contains(path, "go/test") {
102+
if !strings.HasSuffix(path, "/test") {
104103
dirs = append(dirs, path)
105104
}
106105
}

0 commit comments

Comments
 (0)