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

Function test_mkdirp

tests/test_cli.c:725–736  ·  view source on GitHub ↗

Helper: mkdirp */

Source from the content-addressed store, hash-verified

723
724/* Helper: mkdirp */
725static int test_mkdirp(const char *path) {
726 char tmp[1024];
727 snprintf(tmp, sizeof(tmp), "%s", path);
728 for (char *p = tmp + 1; *p; p++) {
729 if (*p == '/') {
730 *p = '\0';
731 cbm_mkdir(tmp);
732 *p = '/';
733 }
734 }
735 return cbm_mkdir(tmp) == 0 || errno == EEXIST ? 0 : -1;
736}
737
738/* Helper: recursive remove */
739static void test_rmdir_r(const char *path) {

Callers 5

test_cli.cFile · 0.85
cli_scope_fixture_startFunction · 0.85
openhands_fixture_openFunction · 0.85
client_detect_fixtureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected