Skip to content

Commit

Permalink
[dev.typeparams] test: fix excluded files lookup so it works on Windows
Browse files Browse the repository at this point in the history
Updates #43866.

Change-Id: I15360de11a48c6f23f25c5ff3a15c117a34127ff
Reviewed-on: https://go-review.googlesource.com/c/go/+/286034
Trust: Robert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
  • Loading branch information
griesemer committed Jan 24, 2021
1 parent 7947df4 commit 9456804
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -766,9 +766,10 @@ func (t *test) run() {
// eliminate the flag list.

// Excluded files.
if excluded[t.goFileName()] {
filename := strings.Replace(t.goFileName(), "\\", "/", -1) // goFileName() uses \ on Windows
if excluded[filename] {
if *verbose {
fmt.Printf("excl\t%s\n", t.goFileName())
fmt.Printf("excl\t%s\n", filename)
}
return // cannot handle file yet
}
Expand All @@ -791,7 +792,7 @@ func (t *test) run() {
} {
if strings.Contains(flag, pattern) {
if *verbose {
fmt.Printf("excl\t%s\t%s\n", t.goFileName(), flags)
fmt.Printf("excl\t%s\t%s\n", filename, flags)
}
return // cannot handle flag
}
Expand Down

0 comments on commit 9456804

Please sign in to comment.