mirror of
https://github.com/golang/go
synced 2024-11-18 18:54:42 -07:00
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:
parent
36c10c0a62
commit
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)} {
|
||||
|
Loading…
Reference in New Issue
Block a user