Fixture-dir provider: tests/fixtures/complexity/ / — every file in * it is copied verbatim into each module dir. Lets a new language join the * guard by dropping fixtures, with no edit to this suite. */
| 168 | * it is copied verbatim into each module dir. Lets a new language join the |
| 169 | * guard by dropping fixtures, with no edit to this suite. */ |
| 170 | static bool cx_fixture_dir_for(CBMLanguage lang, char *out, size_t cap) { |
| 171 | const char *name = cbm_language_name(lang); |
| 172 | if (!name || !name[0]) { |
| 173 | return false; |
| 174 | } |
| 175 | snprintf(out, cap, "tests/fixtures/complexity/%s", name); |
| 176 | cbm_dir_t *d = cbm_opendir(out); |
| 177 | if (!d) { |
| 178 | return false; |
| 179 | } |
| 180 | cbm_closedir(d); |
| 181 | return true; |
| 182 | } |
| 183 | |
| 184 | static int cx_copy_file(const char *src, const char *dst) { |
| 185 | FILE *in = fopen(src, "rb"); |
no test coverage detected