package cli import ( "strings" "testing" ) var _ func() *App = NewApp func TestAppRunRejectsUnknownCommand(t *testing.T) { app := NewApp() err := app.Run([]string{"unknown"}) if err == nil { t.Fatal("expected error for unknown command") } } func TestAppRunShowsUsageWhenNoArgsProvided(t *testing.T) { app := NewApp() err := app.Run(nil) if err == nil { t.Fatal("expected error for missing command") } if !strings.Contains(err.Error(), "usage:") { t.Fatalf("expected usage text in error, got %q", err.Error()) } } func TestAppRunAcceptsSetupAndMcp(t *testing.T) { app := NewApp() for _, command := range []string{"setup", "mcp"} { t.Run(command, func(t *testing.T) { if err := app.Run([]string{command}); err != nil { t.Fatalf("expected %q to be accepted, got error: %v", command, err) } }) } }