summaryrefslogtreecommitdiff
path: root/internal/lsp/chat_history_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/chat_history_test.go
parentacc400768153a7bfda1413f15579c9455b877c87 (diff)
fix
Diffstat (limited to 'internal/lsp/chat_history_test.go')
-rw-r--r--internal/lsp/chat_history_test.go11
1 files changed, 6 insertions, 5 deletions
diff --git a/internal/lsp/chat_history_test.go b/internal/lsp/chat_history_test.go
index b1cae80..70080f3 100644
--- a/internal/lsp/chat_history_test.go
+++ b/internal/lsp/chat_history_test.go
@@ -3,19 +3,20 @@ package lsp
import "testing"
func TestStripTrailingTrigger(t *testing.T) {
- if got := stripTrailingTrigger("what?"); got != "what" {
+ s := newTestServer()
+ if got := s.stripTrailingTrigger("what?"); got != "what" {
t.Fatalf("should remove trailing ?")
}
- if got := stripTrailingTrigger("what?>"); got != "what?" {
+ if got := s.stripTrailingTrigger("what?>"); got != "what?" {
t.Fatalf("should drop trailing > when preceded by ?")
}
- if got := stripTrailingTrigger("ok!>"); got != "ok!" {
+ if got := s.stripTrailingTrigger("ok!>"); got != "ok!" {
t.Fatalf("should drop > after !")
}
- if got := stripTrailingTrigger("note:>"); got != "note:" {
+ if got := s.stripTrailingTrigger("note:>"); got != "note:" {
t.Fatalf("should drop > after :")
}
- if got := stripTrailingTrigger("go;>"); got != "go;" {
+ if got := s.stripTrailingTrigger("go;>"); got != "go;" {
t.Fatalf("should drop > after ;")
}
}