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

Function read_test_file

tests/test_cli.c:408–417  ·  view source on GitHub ↗

Helper: read a file into static buffer */

Source from the content-addressed store, hash-verified

406
407/* Helper: read a file into static buffer */
408static const char *read_test_file(const char *path) {
409 static char buf[8192];
410 FILE *f = fopen(path, "r");
411 if (!f)
412 return NULL;
413 size_t n = fread(buf, 1, sizeof(buf) - 1, f);
414 fclose(f);
415 buf[n] = '\0';
416 return buf;
417}
418
419static char *read_test_file_alloc(const char *path) {
420 FILE *f = fopen(path, "rb");

Calls 2

fopenFunction · 0.85
freadFunction · 0.85

Tested by

no test coverage detected