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

Function fixture_file_equals

tests/test_sqlite_writer.c:51–61  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51static int fixture_file_equals(const char *path, const char *expected) {
52 FILE *fp = cbm_fopen(path, "rb");
53 if (!fp) {
54 return 0;
55 }
56 char buf[64] = {0};
57 size_t n = fread(buf, 1, sizeof(buf), fp);
58 int close_rc = fclose(fp);
59 size_t expected_len = strlen(expected);
60 return close_rc == 0 && n == expected_len && memcmp(buf, expected, expected_len) == 0;
61}
62
63static int count_temp_outputs_for(const char *path) {
64 char dir[256];

Callers 1

Calls 1

cbm_fopenFunction · 0.85

Tested by

no test coverage detected