/* * etimetest.c * * HEADER Testing read_config.c shutdown callback * * Expected SUCCESSes for all tests: 8 * * Test of snmpd_unregister_config_handler SUCCESSes: 4 * Test of unregister_all_config_handlers SUCCESSes: 4 * */ #include #include #include #include /* #undef TEST_INTERNAL_API */ #define TEST_INTERNAL_API 1 /* * Global variables. */ int callback_called = 0; static void test_callback(void); static void test_callback(void) { ++callback_called; }; static void parse_config(const char *token, char *cptr); static void parse_config(const char *token, char *cptr) { /* do nothing */ }; /* each test returns 0 on success, and >0 on failure */ int test1(void); int test2(void); int test3(void); int (*tests[])(void) = { test1, test2, test3 }; int main(int argc, char *argv[]) { int i,ret=0; for(i=0;i