Skip to content

Commit

Permalink
cmd/vet: make TestTags pass on windows
Browse files Browse the repository at this point in the history
Update golang/go#11811

Change-Id: I3d875acf58a015fa4cae16473a118ac8196b9b44
Reviewed-on: https://go-review.googlesource.com/12789
Reviewed-by: Andrew Gerrand <[email protected]>
  • Loading branch information
alexbrainman committed Jul 29, 2015
1 parent 0f0e72b commit 7ba2a8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/vet/vet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

const (
dataDir = "testdata"
binary = "testvet"
binary = "testvet.exe"
)

// Run this shell script, but do it in Go so it can be run by "go test".
Expand Down Expand Up @@ -93,10 +93,10 @@ func TestTags(t *testing.T) {
t.Fatal(err)
}
// file1 has testtag and file2 has !testtag.
if !bytes.Contains(output, []byte("tagtest/file1.go")) {
if !bytes.Contains(output, []byte(filepath.Join("tagtest", "file1.go"))) {
t.Error("file1 was excluded, should be included")
}
if bytes.Contains(output, []byte("tagtest/file2.go")) {
if bytes.Contains(output, []byte(filepath.Join("tagtest", "file2.go"))) {
t.Error("file2 was included, should be excluded")
}
}

0 comments on commit 7ba2a8c

Please sign in to comment.