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

Function write_fixture_file

tests/test_sqlite_writer.c:40–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

cbm_fopenFunction · 0.85

Tested by

no test coverage detected