| 235 | } |
| 236 | |
| 237 | static int source_write(const char *path, const char *bytes) { |
| 238 | FILE *file = cbm_fopen(path, "wb"); |
| 239 | if (!file) return -1; |
| 240 | size_t len = strlen(bytes); |
| 241 | bool ok = fwrite(bytes, 1, len, file) == len; |
| 242 | if (fclose(file) != 0) ok = false; |
| 243 | return ok ? 0 : -1; |
| 244 | } |
| 245 | |
| 246 | static void source_fixture_close(source_fixture_t *f) { |
| 247 | (void)remove(f->path); |
no test coverage detected