#include #include #include #include #include "ttail_check.h" #include "ttail.h" #include "ttail_init.h" /* * Empty argument parsing test case */ START_TEST (test_argparse_empty_logfilename) { ck_assert_msg(ttail->logfile_name == NULL, "ttail_t.logfile_name should be NULL"); } END_TEST START_TEST (test_argparse_empty_logfile) { ck_assert_msg(ttail->logfile == NULL, "ttail_t.logfile should be NULL"); } END_TEST START_TEST (test_argparse_empty_logfilesz) { ck_assert_msg(ttail->logfile_sz == 0, "ttail_t.logfile_sz should be 0"); } END_TEST START_TEST (test_argparse_empty_flag) { ck_assert_msg(ttail->flag == 0, "ttail_t.flag should be 0"); } END_TEST START_TEST (test_argparse_empty_fmt) { ck_assert_msg(ttail->fmt == NULL, "ttail_t.fmt should be NULL"); } END_TEST START_TEST (test_argparse_empty_verbose) { ck_assert_msg(ttail->verbose == 0, "ttail_t.verbose should be 0"); } END_TEST START_TEST (test_argparse_empty_prefixsz) { ck_assert_msg(ttail->prefix_sz == -1, "ttail_t.prefix_sz should be NULL"); } END_TEST START_TEST (test_argparse_empty_session) { ck_assert_msg(ttail->session == NULL, "ttail_t.session should be NULL"); } END_TEST TTAIL_CHECK_START("ttail argument parsing checks", "empty arguments parsing") TTAIL_SET_FIXTURE(setup_ttail_empty, teardown_ttail); TTAIL_ADD_TEST(test_argparse_empty_logfilename); TTAIL_ADD_TEST(test_argparse_empty_logfile); TTAIL_ADD_TEST(test_argparse_empty_logfilesz); TTAIL_ADD_TEST(test_argparse_empty_flag); TTAIL_ADD_TEST(test_argparse_empty_fmt); TTAIL_ADD_TEST(test_argparse_empty_verbose); TTAIL_ADD_TEST(test_argparse_empty_prefixsz); TTAIL_ADD_TEST(test_argparse_empty_session); TTAIL_CHECK_END