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

Function cte_fixture

tests/test_config_toml_edit.c:35–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33 "command = \"codebase-memory-mcp\"\n";
34
35static int cte_fixture(char *dir, size_t dir_size, char *path, size_t path_size) {
36 char *created = th_mktempdir("cbm_toml_edit");
37 if (!created) {
38 return -1;
39 }
40 int dir_len = snprintf(dir, dir_size, "%s", created);
41 int path_len = snprintf(path, path_size, "%s/config.toml", dir);
42 if (dir_len < 0 || (size_t)dir_len >= dir_size || path_len < 0 ||
43 (size_t)path_len >= path_size) {
44 th_cleanup(created);
45 return -1;
46 }
47 return 0;
48}
49
50static int cte_read(const char *path, char *output, size_t output_size) {
51 if (!path || !output || output_size == 0) {

Callers 1

Calls 2

th_mktempdirFunction · 0.85
th_cleanupFunction · 0.85

Tested by

no test coverage detected