返回 DeepSeek-Reasonix
slash_test.go
根目录 / internal / cli / slash_test.go
1 package cli
2
3 import (
4 "testing"
5
6 "reasonix/internal/command"
7 )
8
9 func TestChatCommandNames(t *testing.T) {
10 m := chatTUI{commands: []command.Command{{Name: "review"}, {Name: "git:commit"}, {Name: "plan", Hidden: true}}}
11 if got := m.commandNames(); got != "/review · /git:commit" {
12 t.Errorf("commandNames = %q", got)
13 }
14
15 if got := (&chatTUI{}).commandNames(); got != "" {
16 t.Errorf("empty commandNames = %q, want \"\"", got)
17 }
18 }
19
19 lines GO