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

Function write_fixture_file

tests/test_sqlite_writer.c:41–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41static int write_fixture_file(const char *path, const char *contents) {
42 FILE *fp = cbm_fopen(path, "wb");
43 if (!fp) {
44 return -1;
45 }
46 size_t len = strlen(contents);
47 size_t written = fwrite(contents, 1, len, fp);
48 int close_rc = fclose(fp);
49 return written == len && close_rc == 0 ? 0 : -1;
50}
51
52static int fixture_file_equals(const char *path, const char *expected) {
53 FILE *fp = cbm_fopen(path, "rb");

Callers 1

Calls 2

cbm_fopenFunction · 0.85
fwriteFunction · 0.85

Tested by

no test coverage detected