(t *testing.T)
| 74 | } |
| 75 | |
| 76 | func TestToonOutputProducesToonDocument(t *testing.T) { |
| 77 | t.Parallel() |
| 78 | |
| 79 | t.Run("Should produce TOON document", func(t *testing.T) { |
| 80 | t.Parallel() |
| 81 | |
| 82 | deps := newTestDeps(t, &stubClient{ |
| 83 | listAgentsFn: func(_ context.Context, _ AgentQuery) ([]AgentRecord, error) { |
| 84 | return []AgentRecord{{Name: "coder", Provider: "codex", Tools: []string{"shell"}}}, nil |
| 85 | }, |
| 86 | }) |
| 87 | |
| 88 | stdout, _, err := executeRootCommand(t, deps, "agent", "list", "-o", "toon") |
| 89 | if err != nil { |
| 90 | t.Fatalf("executeRootCommand() error = %v", err) |
| 91 | } |
| 92 | if !strings.Contains(stdout, "agents[1]{name,provider,model,category,tool_count,permissions}:") { |
| 93 | t.Fatalf("toon output = %q, want TOON header", stdout) |
| 94 | } |
| 95 | }) |
| 96 | } |
| 97 | |
| 98 | func TestAgentCategoryLabel(t *testing.T) { |
| 99 | t.Parallel() |
nothing calls this directly
no test coverage detected