| 43 | |
| 44 | #ifndef _WIN32 |
| 45 | static bool diagnostics_file_equals(const char *path, const char *expected) { |
| 46 | char contents[128] = ""; |
| 47 | FILE *file = cbm_fopen(path, "rb"); |
| 48 | if (!file) { |
| 49 | return false; |
| 50 | } |
| 51 | size_t length = fread(contents, 1, sizeof(contents) - 1, file); |
| 52 | bool closed = fclose(file) == 0; |
| 53 | contents[length] = '\0'; |
| 54 | return closed && strcmp(contents, expected) == 0; |
| 55 | } |
| 56 | #endif |
| 57 | |
| 58 | static bool diagnostics_capture_paths(diagnostics_paths_t *paths) { |
no test coverage detected