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

Function cte_fixture

tests/test_config_toml_edit.c:67–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67static int cte_fixture(char *dir, size_t dir_size, char *path, size_t path_size) {
68 char *created = th_mktempdir("cbm_toml_edit");
69 if (!created) {
70 return -1;
71 }
72 int dir_len = snprintf(dir, dir_size, "%s", created);
73 int path_len = snprintf(path, path_size, "%s/config.toml", dir);
74 if (dir_len < 0 || (size_t)dir_len >= dir_size || path_len < 0 ||
75 (size_t)path_len >= path_size) {
76 th_cleanup(created);
77 return -1;
78 }
79 return 0;
80}
81
82static int cte_read(const char *path, char *output, size_t output_size) {
83 if (!path || !output || output_size == 0) {

Callers 1

Calls 2

th_mktempdirFunction · 0.85
th_cleanupFunction · 0.85

Tested by

no test coverage detected