#include #include #include #include #include "ttail_check.h" #include "ttail.h" #include "ttail_init.h" /* * Bad arguments */ START_TEST (test_argparse_bad1) { ttail_t *t; char *args[] = {"foo", "--sdfsdf"}; t = ttail_init(2, args); ck_assert(t == NULL); } END_TEST START_TEST (test_argparse_bad2) { ttail_t *t; char *args[] = {"foo", "-x"}; t = ttail_init(2, args); ck_assert(t == NULL); } END_TEST START_TEST (test_argparse_bad3) { ttail_t *t; char *args[] = {"foo", "-p"}; t = ttail_init(2, args); ck_assert(t == NULL); } END_TEST START_TEST (test_argparse_bad4) { ttail_t *t; char *args[] = {"foo", "-f"}; t = ttail_init(2, args); ck_assert(t == NULL); } END_TEST START_TEST (test_argparse_bad5) { ttail_t *t; char *args[] = {"foo", "-d"}; t = ttail_init(2, args); ck_assert(t == NULL); } END_TEST START_TEST (test_argparse_bad6) { ttail_t *t; char *args[] = {"foo", "-m"}; t = ttail_init(2, args); ck_assert(t == NULL); } END_TEST START_TEST (test_argparse_bad7) { ttail_t *t; char *args[] = {"foo", "-l"}; t = ttail_init(2, args); ck_assert(t == NULL); } END_TEST TTAIL_CHECK_START("ttail argument parsing checks", "bad arguments parsing") TTAIL_ADD_TEST(test_argparse_bad1); TTAIL_ADD_TEST(test_argparse_bad2); TTAIL_ADD_TEST(test_argparse_bad3); TTAIL_ADD_TEST(test_argparse_bad4); TTAIL_ADD_TEST(test_argparse_bad5); TTAIL_ADD_TEST(test_argparse_bad6); TTAIL_ADD_TEST(test_argparse_bad7); TTAIL_CHECK_END