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

Function cte_fixture

tests/test_config_text_edit.c:36–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34 size_t expected_length);
35
36static int cte_fixture(char *dir, size_t dir_size, char *path, size_t path_size) {
37 char *created = th_mktempdir("cbm_text_edit");
38 if (!created) {
39 return -1;
40 }
41 int dir_count = snprintf(dir, dir_size, "%s", created);
42 int path_count = snprintf(path, path_size, "%s/AGENTS.md", created);
43 if (dir_count < 0 || (size_t)dir_count >= dir_size || path_count < 0 ||
44 (size_t)path_count >= path_size) {
45 th_cleanup(created);
46 return -1;
47 }
48 return 0;
49}
50
51static int cte_write_bytes(const char *path, const char *data, size_t len) {
52 FILE *file = cbm_fopen(path, "wb");

Callers 1

Calls 2

th_mktempdirFunction · 0.85
th_cleanupFunction · 0.85

Tested by

no test coverage detected