#include "test.h" #include #include void test_errors(void) { char **listing = list_dir("errors", ".pom"); if (!listing) return; for (size_t i = 0; listing[i]; i++) { const char *conf_path = listing[i]; printf("Testing %s...\n",conf_path); pom_error *error; pom_conf *conf = pom_load_path(NULL, conf_path, &error); if (error) { free(error); continue; } test_fail("Parsing %s didn't produce an error but it should have.", conf_path); pom_conf_free(conf); } free_listing(listing); // pom_conf *conf = pom_load_path("../tests"); }