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

Function cte_fixture

tests/test_config_toml_edit.c:53–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51}
52
53static int cte_fixture(char *dir, size_t dir_size, char *path, size_t path_size) {
54 char *created = th_mktempdir("cbm_toml_edit");
55 if (!created) {
56 return -1;
57 }
58 int dir_len = snprintf(dir, dir_size, "%s", created);
59 int path_len = snprintf(path, path_size, "%s/config.toml", dir);
60 if (dir_len < 0 || (size_t)dir_len >= dir_size || path_len < 0 ||
61 (size_t)path_len >= path_size) {
62 th_cleanup(created);
63 return -1;
64 }
65 return 0;
66}
67
68static int cte_read(const char *path, char *output, size_t output_size) {
69 if (!path || !output || output_size == 0) {

Callers 1

Calls 2

th_mktempdirFunction · 0.85
th_cleanupFunction · 0.85

Tested by

no test coverage detected