From f25d0131d475904250c3a8d0005799a96a8e5538 Mon Sep 17 00:00:00 2001 From: Alex Brainman Date: Wed, 29 Jul 2015 16:20:08 +1000 Subject: [PATCH] go/loader: make TestLoad_ParseError_AllowErrors pass on windows Update golang/go#11811 Change-Id: Ic5f1ea87c88d563b6e0ef2d44042e28a9ea03a03 Reviewed-on: https://go-review.googlesource.com/12830 Reviewed-by: Robert Griesemer --- go/loader/loader_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go/loader/loader_test.go b/go/loader/loader_test.go index 0b42e398d55..eb06f04d6c2 100644 --- a/go/loader/loader_test.go +++ b/go/loader/loader_test.go @@ -7,6 +7,7 @@ package loader_test import ( "fmt" "go/build" + "path/filepath" "reflect" "sort" "strings" @@ -221,8 +222,9 @@ func TestLoad_ParseError_AllowErrors(t *testing.T) { if len(badpkg.Files) != 1 { t.Errorf("badpkg has %d files, want 1", len(badpkg.Files)) } - wantErr := "testdata/badpkgdecl.go:1:34: expected 'package', found 'EOF'" + wantErr := filepath.Join("testdata", "badpkgdecl.go") + ":1:34: expected 'package', found 'EOF'" if !hasError(badpkg.Errors, wantErr) { + t.Errorf("badpkg.Errors = %v, want %s", badpkg.Errors, wantErr) } }