From 7ba2a8c9a970818574cbc70d8144c9fefefcc43f Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Wed, 29 Jul 2015 15:41:15 +1000 Subject: [PATCH] cmd/vet: make TestTags pass on windows Update golang/go#11811 Change-Id: I3d875acf58a015fa4cae16473a118ac8196b9b44 Reviewed-on: https://go-review.googlesource.com/12789 Reviewed-by: Andrew Gerrand --- cmd/vet/vet_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/vet/vet_test.go b/cmd/vet/vet_test.go index 0027a1f3291..25ee687693b 100644 --- a/cmd/vet/vet_test.go +++ b/cmd/vet/vet_test.go @@ -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". @@ -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") } }