aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/syntax/parser_test.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2016-11-01 15:15:11 -0700
committerRobert Griesemer <gri@golang.org>2016-11-01 22:26:11 +0000
commit012fec3821d6d01b69a563125fcb7ae49186be81 (patch)
treeda5e56e60fea50b80fedba1f087f4a1ee1eac6ba /src/cmd/compile/internal/syntax/parser_test.go
parent7c7349c9e9217d7bb22f41eaa658bbba8716bad6 (diff)
downloadgo-012fec3821d6d01b69a563125fcb7ae49186be81.tar.gz
go-012fec3821d6d01b69a563125fcb7ae49186be81.zip
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 <gri@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/syntax/parser_test.go')
-rw-r--r--src/cmd/compile/internal/syntax/parser_test.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/syntax/parser_test.go b/src/cmd/compile/internal/syntax/parser_test.go
index 3cb12c23d5..0eb9cd5eb3 100644
--- a/src/cmd/compile/internal/syntax/parser_test.go
+++ b/src/cmd/compile/internal/syntax/parser_test.go
@@ -47,7 +47,6 @@ func TestStdLib(t *testing.T) {
defer close(results)
for _, dir := range []string{
runtime.GOROOT(),
- //"/Users/gri/src",
} {
walkDirs(t, dir, func(filename string) {
if debug {
@@ -100,7 +99,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.Contains(path, "go/test") {
+ if !strings.HasSuffix(path, "/test") {
dirs = append(dirs, path)
}
}