Files
DeepSeek-Reasonix/internal/cli/slash_test.go
T
yhhandClaude Opus 4.8 7de6a2474f feat: import Go implementation as v2 kernel (renamed duo → reasonix)
Bring in the finished Go rewrite (developed under the placeholder name
"duo") as the v2 codebase. Code-only import — no upstream git history.

Config- and plugin-driven coding agent: registry core, OpenAI-compatible
providers, builtin tools, MCP (stdio + HTTP) plugins, permission + sandbox,
custom slash commands, @-references, two-model collaboration.

Renamed throughout: duo→reasonix, Duo→Reasonix, DUO→REASONIX — module path,
imports, CLI name, cmd/ dirs, reasonix.toml, .reasonix/commands, and
$REASONIX_* env prefixes. Kept the v2 MIT LICENSE (the Go project had none).

Verified: go build ./... · go vet ./... · go test ./... all green; gofmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-05-29 18:13:20 -07:00

29 lines
684 B
Go

package cli
import (
"testing"
"reasonix/internal/command"
)
func TestChatCommandLookupAndNames(t *testing.T) {
m := chatTUI{commands: []command.Command{{Name: "review"}, {Name: "git:commit"}}}
if _, ok := m.lookupCommand("review"); !ok {
t.Error("review should be found")
}
if _, ok := m.lookupCommand("git:commit"); !ok {
t.Error("git:commit should be found")
}
if _, ok := m.lookupCommand("missing"); ok {
t.Error("missing should not be found")
}
if got := m.commandNames(); got != "/review · /git:commit" {
t.Errorf("commandNames = %q", got)
}
if got := (&chatTUI{}).commandNames(); got != "" {
t.Errorf("empty commandNames = %q, want \"\"", got)
}
}