summaryrefslogtreecommitdiff
path: root/internal/lsp/document_handlers_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-09-19 22:52:48 +0300
committerPaul Buetow <paul@buetow.org>2025-09-19 22:52:48 +0300
commiteb72b06fe8e62cb77af73f6dc558d384a5a5fe80 (patch)
treeefeb1165b9fbcb69a4ee675dba7bdc8c28fee3aa /internal/lsp/document_handlers_test.go
parentacc400768153a7bfda1413f15579c9455b877c87 (diff)
fix
Diffstat (limited to 'internal/lsp/document_handlers_test.go')
-rw-r--r--internal/lsp/document_handlers_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/lsp/document_handlers_test.go b/internal/lsp/document_handlers_test.go
index eae5020..1fdd0da 100644
--- a/internal/lsp/document_handlers_test.go
+++ b/internal/lsp/document_handlers_test.go
@@ -34,6 +34,7 @@ func TestDidOpenChangeClose_UpdateDocs(t *testing.T) {
func TestClientShowDocument_WritesRequest(t *testing.T) {
var out bytes.Buffer
s := &Server{logger: log.New(io.Discard, "", 0), docs: make(map[string]*document), out: &out}
+ initServerDefaults(s)
uri := "file:///x.go"
sel := Range{Start: Position{Line: 1}, End: Position{Line: 2}}
out.Reset()
@@ -47,6 +48,7 @@ func TestClientShowDocument_WritesRequest(t *testing.T) {
func TestHandleExecuteCommand_ShowDocument(t *testing.T) {
var out bytes.Buffer
s := &Server{logger: log.New(io.Discard, "", 0), docs: make(map[string]*document), out: &out}
+ initServerDefaults(s)
uri := "file:///x.go"
r := Range{Start: Position{Line: 0}, End: Position{Line: 0}}
args := []any{uri, r}
@@ -61,6 +63,7 @@ func TestHandleExecuteCommand_ShowDocument(t *testing.T) {
func TestDeferShowDocument_WritesLater(t *testing.T) {
var out bytes.Buffer
s := &Server{logger: log.New(io.Discard, "", 0), docs: make(map[string]*document), out: &out}
+ initServerDefaults(s)
uri := "file:///x.go"
out.Reset()
s.deferShowDocument(uri, Range{Start: Position{Line: 0}, End: Position{Line: 0}})