MCPcopy Index your code
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 }
227}
228
229func TestExecuteBashWrapsResult(t *testing.T) {
230 call := chmctx.ToolCall{
231 ID: "call_1", Name: "bash",
232 Arguments: map[string]any{"cmd": "echo hi"},
233 }
234 msg := Execute(context.Background(), call)
235 if msg.Role != chmctx.RoleTool || msg.ToolCallID != "call_1" || msg.ToolName != "bash" {
236 t.Fatalf("bad message: %+v", msg)
237 }
238 if !strings.Contains(msg.Content, "hi") {
239 t.Fatalf("content missing: %q", msg.Content)
240 }
241}
242
243func TestExecuteUnknownTool(t *testing.T) {

Callers

nothing calls this directly

Calls 1

ExecuteFunction · 0.85

Tested by

no test coverage detected