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

Function TestEditFileSchemaShape

internal/tools/edit_test.go:219–241  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

217}
218
219func TestEditFileSchemaShape(t *testing.T) {
220 sch := EditFileSchema()
221 fn, ok := sch["function"].(map[string]any)
222 if !ok {
223 t.Fatal("missing function")
224 }
225 if fn["name"] != "edit_file" {
226 t.Fatalf("name wrong: %v", fn["name"])
227 }
228 params, ok := fn["parameters"].(map[string]any)
229 if !ok {
230 t.Fatal("missing parameters")
231 }
232 props, ok := params["properties"].(map[string]any)
233 if !ok {
234 t.Fatal("missing properties")
235 }
236 for _, key := range []string{"path", "old_string", "new_string"} {
237 if _, ok := props[key]; !ok {
238 t.Fatalf("missing property %q", key)
239 }
240 }
241}

Callers

nothing calls this directly

Calls 1

EditFileSchemaFunction · 0.85

Tested by

no test coverage detected