| 5856 | } |
| 5857 | |
| 5858 | static bool file_has_content(const char *path, const char *expected) { |
| 5859 | FILE *f = cbm_fopen(path, "rb"); |
| 5860 | if (!f) { |
| 5861 | return false; |
| 5862 | } |
| 5863 | char buf[256] = {0}; |
| 5864 | size_t n = fread(buf, 1, sizeof(buf) - 1, f); |
| 5865 | (void)fclose(f); |
| 5866 | return n == strlen(expected) && memcmp(buf, expected, n) == 0; |
| 5867 | } |
| 5868 | |
| 5869 | /* #1839 / #1864: a stage a dead writer left beside a VALID database is swept |
| 5870 | * by the next run and never influences its route. The 0-byte shape is what a |
no test coverage detected