summaryrefslogtreecommitdiff
path: root/internal/lsp/init_shutdown_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-09-06 10:56:27 +0300
committerPaul Buetow <paul@buetow.org>2025-09-06 10:56:27 +0300
commit320de746f7a2985b60c8564a0e65bdf231e840b7 (patch)
treee70bcf50813dba411afa2934e774383124bbc99e /internal/lsp/init_shutdown_test.go
parent06247527d5170f329b454b42f59a3e4434ab1f4b (diff)
use gofumpt
Diffstat (limited to 'internal/lsp/init_shutdown_test.go')
-rw-r--r--internal/lsp/init_shutdown_test.go27
1 files changed, 14 insertions, 13 deletions
diff --git a/internal/lsp/init_shutdown_test.go b/internal/lsp/init_shutdown_test.go
index 7b08f2c..19b9b33 100644
--- a/internal/lsp/init_shutdown_test.go
+++ b/internal/lsp/init_shutdown_test.go
@@ -1,20 +1,21 @@
package lsp
import (
- "bytes"
- "encoding/json"
- "io"
- "log"
- "testing"
+ "bytes"
+ "encoding/json"
+ "io"
+ "log"
+ "testing"
)
func TestHandleShutdown_Replies(t *testing.T) {
- var out bytes.Buffer
- s := &Server{logger: log.New(io.Discard, "", 0), docs: make(map[string]*document), out: &out}
- req := Request{JSONRPC: "2.0", ID: json.RawMessage("12"), Method: "shutdown"}
- out.Reset()
- s.handleShutdown(req)
- resp := captureResponse(t, &out)
- if string(resp.ID) != "12" || resp.Error != nil { t.Fatalf("unexpected shutdown response: %+v", resp) }
+ var out bytes.Buffer
+ s := &Server{logger: log.New(io.Discard, "", 0), docs: make(map[string]*document), out: &out}
+ req := Request{JSONRPC: "2.0", ID: json.RawMessage("12"), Method: "shutdown"}
+ out.Reset()
+ s.handleShutdown(req)
+ resp := captureResponse(t, &out)
+ if string(resp.ID) != "12" || resp.Error != nil {
+ t.Fatalf("unexpected shutdown response: %+v", resp)
+ }
}
-