INNER CODE UNIT · Go
TestAgentsInit_NoArgs
jrswab/axe · cmd/agents_test.go:476
func TestAgentsInit_NoArgs(t *testing.T) {
buf := new(bytes.Buffer)
errBuf := new(bytes.Buffer)
rootCmd.SetOut(buf)
rootCmd.SetErr(errBuf)
rootCmd.SetArgs([]string{"agents", "init"})
err := rootCmd.Execute()
if err == nil {
t.Fatal("expected error for missing args, got nil")
}
if !strings.Contains(err.Error(), "missing required argument: <agent>") {
t.Errorf("error = %q, want to contain 'missing required argument: <agent>'", err.Error())
}
}
// --- Phase 11: agents edit ---