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

Function client_detect_fixture

tests/test_cli.c:6824–6832  ·  view source on GitHub ↗

Fresh home plus an empty bin dir used as the whole PATH. */

Source from the content-addressed store, hash-verified

6822
6823/* Fresh home plus an empty bin dir used as the whole PATH. */
6824static bool client_detect_fixture(char *home, size_t home_sz, char *bin, size_t bin_sz) {
6825 snprintf(home, home_sz, "/tmp/cli-client-detect-XXXXXX");
6826 if (!cbm_mkdtemp(home)) {
6827 return false;
6828 }
6829 snprintf(bin, bin_sz, "%s/bin", home);
6830 test_mkdirp(bin);
6831 return true;
6832}
6833
6834/* #1180: a bare ~/.claude directory no longer counts as Claude Code. Fixtures
6835 * that model a Claude Code user add the user config Claude Code itself writes

Callers 1

test_cli.cFile · 0.85

Calls 2

cbm_mkdtempFunction · 0.85
test_mkdirpFunction · 0.85

Tested by

no test coverage detected