diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-12 09:33:49 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-12 09:33:49 +0200 |
| commit | da160fbdfb30a55a4d617553baeb5b0a5a9d5fb8 (patch) | |
| tree | 8c8c184d3947211c82f10b198c7b366a01cd4780 /cmd/hexai-lsp-server/main_test.go | |
| parent | cfd02d2874992f7e293d5098bd328a495825a8d4 (diff) | |
Rename hexai-lsp command to hexai-lsp-server
Amp-Thread-ID: https://ampcode.com/threads/T-019c50bc-2906-77db-a31e-0d553338d99b
Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'cmd/hexai-lsp-server/main_test.go')
| -rw-r--r-- | cmd/hexai-lsp-server/main_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/cmd/hexai-lsp-server/main_test.go b/cmd/hexai-lsp-server/main_test.go new file mode 100644 index 0000000..5563e3d --- /dev/null +++ b/cmd/hexai-lsp-server/main_test.go @@ -0,0 +1,22 @@ +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-server", "-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") + } +} |
