diff --git a/internal/lsp/cmd/definition_test.go b/internal/lsp/cmd/definition_test.go index 7508c0ce7..c19957f18 100644 --- a/internal/lsp/cmd/definition_test.go +++ b/internal/lsp/cmd/definition_test.go @@ -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)} {