MCPcopy Create free account
hub / github.com/codehamr/codehamr / TestExecuteBashWrapsResult

Function TestExecuteBashWrapsResult

internal/tools/bash_test.go:228–240  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

226 t.Fatalf("expected backgrounded command output, got %q", out)
227 }
228}
229
230func TestExecuteBashWrapsResult(t *testing.T) {
231 call := chmctx.ToolCall{
232 ID: "call_1", Name: "bash",
233 Arguments: map[string]any{"cmd": "echo hi"},
234 }
235 msg := Execute(context.Background(), call)
236 if msg.Role != chmctx.RoleTool || msg.ToolCallID != "call_1" || msg.ToolName != "bash" {
237 t.Fatalf("bad message: %+v", msg)
238 }
239 if !strings.Contains(msg.Content, "hi") {
240 t.Fatalf("content missing: %q", msg.Content)
241 }
242}
243

Callers

nothing calls this directly

Calls 1

ExecuteFunction · 0.85

Tested by

no test coverage detected