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

Function php_indexed

tests/test_doc_mentions_php.c:284–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

282static char g_php_db[512];
283
284static bool php_indexed(void) {
285 if (g_php_db[0]) {
286 return true;
287 }
288 snprintf(g_php_tmp, sizeof(g_php_tmp), "/tmp/cbm_dlphp_XXXXXX");
289 if (!cbm_mkdtemp(g_php_tmp)) {
290 return false;
291 }
292 char repo[512];
293 snprintf(repo, sizeof(repo), "%s/repo", g_php_tmp);
294 snprintf(g_php_db, sizeof(g_php_db), "%s/g.db", g_php_tmp);
295 php_write_repo(repo);
296 return dm_index(repo, g_php_db, NULL) == 0;
297}
298
299TEST(doc_mentions_php_resolution) {
300 ASSERT_TRUE(php_indexed());

Callers 1

Calls 3

cbm_mkdtempFunction · 0.85
php_write_repoFunction · 0.85
dm_indexFunction · 0.85

Tested by

no test coverage detected