diff options
| author | Paul Buetow <paul@buetow.org> | 2025-09-06 10:56:27 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-09-06 10:56:27 +0300 |
| commit | 320de746f7a2985b60c8564a0e65bdf231e840b7 (patch) | |
| tree | e70bcf50813dba411afa2934e774383124bbc99e /internal/lsp/chat_no_double_answer_test.go | |
| parent | 06247527d5170f329b454b42f59a3e4434ab1f4b (diff) | |
use gofumpt
Diffstat (limited to 'internal/lsp/chat_no_double_answer_test.go')
| -rw-r--r-- | internal/lsp/chat_no_double_answer_test.go | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/internal/lsp/chat_no_double_answer_test.go b/internal/lsp/chat_no_double_answer_test.go index 9898ad9..8821cd0 100644 --- a/internal/lsp/chat_no_double_answer_test.go +++ b/internal/lsp/chat_no_double_answer_test.go @@ -1,22 +1,21 @@ package lsp import ( - "bytes" - "io" - "log" - "testing" + "bytes" + "io" + "log" + "testing" ) func TestDetectAndHandleChat_NoDoubleAnswer(t *testing.T) { - var out bytes.Buffer - s := &Server{logger: log.New(io.Discard, "", 0), docs: make(map[string]*document), out: &out} - s.llmClient = fakeLLM{resp: "IGNORED"} - uri := "file:///x.go" - // Question line with trigger, followed by an existing answer line starting with '>' - s.setDocument(uri, "What?>\n> already answered\n") - s.detectAndHandleChat(uri) - if out.Len() != 0 { - t.Fatalf("expected no applyEdit request when answer exists; got %d bytes", out.Len()) - } + var out bytes.Buffer + s := &Server{logger: log.New(io.Discard, "", 0), docs: make(map[string]*document), out: &out} + s.llmClient = fakeLLM{resp: "IGNORED"} + uri := "file:///x.go" + // Question line with trigger, followed by an existing answer line starting with '>' + s.setDocument(uri, "What?>\n> already answered\n") + s.detectAndHandleChat(uri) + if out.Len() != 0 { + t.Fatalf("expected no applyEdit request when answer exists; got %d bytes", out.Len()) + } } - |
