/* This software was written by Dirk Engling It is considered beerware. Prost. Skol. Cheers or whatever. $id$ */ /* System */ #include /* Opentracker */ #include "test.h" struct module { const char *name; void (*run)(void); }; static const struct module modules[] = {{"scan_urlencoded_query", test_scan_urlencoded_query}, {"ot_iovec", test_iovec}, {"ot_vector", test_vector}, {"ot_random", test_random}, {"ot_hex", test_hex}, {"ot_scan", test_scan}, {"ot_buf", test_buf}, {"ot_accesslist", test_accesslist}, {NULL, NULL}}; /* Run every module, or only those whose name contains argv[1] */ int main(int argc, char **argv) { const struct module *m; for (m = modules; m->name; ++m) { if (argc > 1 && !strstr(m->name, argv[1])) continue; test_module(m->name); m->run(); } return test_summary(); }