MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / test_append_command_hook

Function test_append_command_hook

tests/test_cli.c:589–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

587
588#ifdef _WIN32
589static bool test_append_command_hook(yyjson_mut_doc *doc, yyjson_mut_val *event_entries,
590 const char *matcher, const char *command) {
591 yyjson_mut_val *entry = yyjson_mut_obj(doc);
592 yyjson_mut_val *hooks = yyjson_mut_arr(doc);
593 yyjson_mut_val *hook = yyjson_mut_obj(doc);
594 return entry && hooks && hook && yyjson_mut_obj_add_str(doc, entry, "matcher", matcher) &&
595 yyjson_mut_obj_add_str(doc, hook, "type", "command") &&
596 yyjson_mut_obj_add_str(doc, hook, "command", command) &&
597 yyjson_mut_arr_append(hooks, hook) &&
598 yyjson_mut_obj_add_val(doc, entry, "hooks", hooks) &&
599 yyjson_mut_arr_append(event_entries, entry);
600}
601
602static size_t test_count_hook_command(yyjson_val *root, const char *event_name,
603 const char *expected_command) {

Callers 1

test_cli.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected