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

Function cte_fixture

tests/test_config_toml_edit.c:69–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 2

th_mktempdirFunction · 0.85
th_cleanupFunction · 0.85

Tested by

no test coverage detected