summaryrefslogtreecommitdiff
path: root/cmd/hexai-lsp
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-09-06 13:19:01 +0300
committerPaul Buetow <paul@buetow.org>2025-09-06 13:19:01 +0300
commit04f290dbeeee8a6fcbc70fed253a968336bcb2ab (patch)
tree3ee23a4ac4bcc5b43b43697cfb0e905735fc6331 /cmd/hexai-lsp
parent5e966f50111adf6e2cb2683fe588f6fe033fa931 (diff)
more tests
Diffstat (limited to 'cmd/hexai-lsp')
-rw-r--r--cmd/hexai-lsp/main_test.go23
1 files changed, 23 insertions, 0 deletions
diff --git a/cmd/hexai-lsp/main_test.go b/cmd/hexai-lsp/main_test.go
new file mode 100644
index 0000000..987bfb4
--- /dev/null
+++ b/cmd/hexai-lsp/main_test.go
@@ -0,0 +1,23 @@
+package main
+
+import (
+ "bytes"
+ "log"
+ "os"
+ "testing"
+)
+
+func TestMain_Version(t *testing.T) {
+ oldArgs := os.Args
+ defer func() { os.Args = oldArgs }()
+ os.Args = []string{"hexai-lsp", "-version"}
+ var buf bytes.Buffer
+ old := log.Writer()
+ log.SetOutput(&buf)
+ defer log.SetOutput(old)
+ main()
+ if buf.Len() == 0 {
+ t.Fatalf("expected version log")
+ }
+}
+