Helper: read a file into static buffer */
| 406 | |
| 407 | /* Helper: read a file into static buffer */ |
| 408 | static const char *read_test_file(const char *path) { |
| 409 | static char buf[8192]; |
| 410 | FILE *f = fopen(path, "r"); |
| 411 | if (!f) |
| 412 | return NULL; |
| 413 | size_t n = fread(buf, 1, sizeof(buf) - 1, f); |
| 414 | fclose(f); |
| 415 | buf[n] = '\0'; |
| 416 | return buf; |
| 417 | } |
| 418 | |
| 419 | static char *read_test_file_alloc(const char *path) { |
| 420 | FILE *f = fopen(path, "rb"); |
no test coverage detected