MCPcopy Create free account
hub / github.com/openclaw/gogcli / TestRunTableCreate_PipeTable

Function TestRunTableCreate_PipeTable

internal/cmd/docs_sed_boost3b_test.go:94–108  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

92}
93
94func TestRunTableCreate_PipeTable(t *testing.T) {
95 doc := buildDoc(para(plain("PLACEHOLDER")))
96 svc, cleanup := newSedTestServer(t, doc)
97 defer cleanup()
98 ctx := mockDocsContext(t, svc)
99
100 cmd := &DocsSedCmd{}
101 u := sedTestUI()
102 pipeExpr := "|Name|Age|\n|Alice|30|"
103 expr := sedExpr{pattern: "PLACEHOLDER", replacement: pipeExpr}
104 spec := parseTableFromPipes(pipeExpr)
105 require.NotNil(t, spec)
106 err := cmd.runTableCreate(ctx, u, "", "test-doc-id", expr, spec)
107 assert.NoError(t, err)
108}
109
110func TestRunTableCreate_NoMatch(t *testing.T) {
111 doc := buildDoc(para(plain("no match here")))

Callers

nothing calls this directly

Calls 8

runTableCreateMethod · 0.95
buildDocFunction · 0.85
paraFunction · 0.85
plainFunction · 0.85
newSedTestServerFunction · 0.85
mockDocsContextFunction · 0.85
sedTestUIFunction · 0.85
parseTableFromPipesFunction · 0.85

Tested by

no test coverage detected