X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=test%2Ftest.c;h=d60adfca07ce41361e3ec6d34f66d38ffbaf0679;hb=e18710da81b4c53b357dde2ca55005344edc314f;hp=1b2b7efc87c54e2b39fb2ec739633f04729d1345;hpb=90efcb0b905753a2eac864bc1a869781d7c31919;p=protos%2Flibecoli.git diff --git a/test/test.c b/test/test.c index 1b2b7ef..d60adfc 100644 --- a/test/test.c +++ b/test/test.c @@ -39,7 +39,7 @@ static const char ec_short_options[] = #define EC_OPT_SEED "seed" static const struct option ec_long_options[] = { - {EC_OPT_HELP, 1, NULL, 'h'}, + {EC_OPT_HELP, 0, NULL, 'h'}, {EC_OPT_LOG_LEVEL, 1, NULL, 'l'}, {EC_OPT_RANDOM_ALLOC_FAIL, 1, NULL, 'r'}, {EC_OPT_SEED, 1, NULL, 's'}, @@ -48,7 +48,7 @@ static const struct option ec_long_options[] = { static void usage(const char *prgname) { - printf("%s [options] [test1 test2 test3...]\n" + fprintf(stderr, "%s [options] [test1 test2 test3...]\n" " -h\n" " --"EC_OPT_HELP"\n" " Show this help.\n" @@ -390,6 +390,8 @@ int main(int argc, char **argv) ret |= ec_test_one(argv[i]); } + ec_exit(); + leaks = debug_alloc_dump_leaks(); if (alloc_fail_proba == 0 && ret != 0) {