зеркало из https://github.com/golang/tools.git
internal/lsp/cmd: fix regexp in test
The test fails if the GOROOT directory contains a dash, e.g. as in /usr/lib/google-golang on corporate workstations, or on certain builders. Change-Id: If08c438764f4b76fff7fb43ccf3e4fd56afeff1a Reviewed-on: https://go-review.googlesource.com/c/tools/+/168063 Reviewed-by: Ian Cottrell <iancottrell@google.com> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Родитель
36c10c0a62
Коммит
3096223ce8
|
@ -38,7 +38,7 @@ func TestDefinitionHelpExample(t *testing.T) {
|
|||
}
|
||||
thisFile := filepath.Join(dir, "definition.go")
|
||||
baseArgs := []string{"query", "definition"}
|
||||
expect := regexp.MustCompile(`^[\w/\\:_]+flag[/\\]flag.go:\d+:\d+-\d+: defined here as type flag.FlagSet struct{.*}$`)
|
||||
expect := regexp.MustCompile(`^[\w/\\:_-]+flag[/\\]flag.go:\d+:\d+-\d+: defined here as type flag.FlagSet struct{.*}$`)
|
||||
for _, query := range []string{
|
||||
fmt.Sprintf("%v:%v:%v", thisFile, cmd.ExampleLine, cmd.ExampleColumn),
|
||||
fmt.Sprintf("%v:#%v", thisFile, cmd.ExampleOffset)} {
|
||||
|
|
Загрузка…
Ссылка в новой задаче