MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / TestBuildCommandArgs_OpenClaw

Function TestBuildCommandArgs_OpenClaw

internal/sessions/transfer_test.go:584–594  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

582}
583
584func TestBuildCommandArgs_OpenClaw(t *testing.T) {
585 sess := mockSession("openclaw/1.0", openClawTools)
586 args := BuildCommandArguments(sess, "exec", "ls -la")
587 if cmd, ok := args["command"].(string); !ok || cmd != "ls -la" {
588 t.Errorf("expected {command: ls -la}, got %v", args)
589 }
590 // Must NOT include extra keys like workdir/timeout — only "command".
591 if len(args) != 1 {
592 t.Errorf("expected exactly 1 key, got %d: %v", len(args), args)
593 }
594}
595
596func TestBuildCommandArgs_OpenClaw_OpenAI(t *testing.T) {
597 sess := mockSession("openclaw/1.0", openClawToolsOpenAI)

Callers

nothing calls this directly

Calls 2

mockSessionFunction · 0.85
BuildCommandArgumentsFunction · 0.85

Tested by

no test coverage detected