mirror of
https://github.com/golang/go
synced 2024-11-18 22:04:43 -07:00
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 <gri@golang.org>
This commit is contained in:
parent
739a26ae62
commit
f25d0131d4
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user