From: brarcher Date: Sat, 4 Jan 2014 18:33:49 +0000 (+0000) Subject: Add new test case for Check error printouts X-Git-Tag: 0.10.0~200 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c1e4543803895c4e88f1636b19e84c78fc15479;p=check Add new test case for Check error printouts When check hits an eprintf() call, this is a "Check error printout". This test case, only available when fork() is available, will test the instances when check should hit an eprintf() and exit. git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1016 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- diff --git a/tests/check_check_master.c b/tests/check_check_master.c index 63d545a..62e0dab 100644 --- a/tests/check_check_master.c +++ b/tests/check_check_master.c @@ -215,6 +215,9 @@ static master_test_t master_tests[] = { { "Msg and fork Tests", CK_FAILURE, "Expected fail" }, #endif /* HAVE_FORK */ +#if defined(HAVE_FORK) && HAVE_FORK==1 +#endif /* HAVE_FORK */ + { "Core", CK_PASS, "Passed" }, { "Core", CK_FAILURE, "We failed" } }; diff --git a/tests/check_check_sub.c b/tests/check_check_sub.c index 65beda5..6c2f56c 100644 --- a/tests/check_check_sub.c +++ b/tests/check_check_sub.c @@ -635,6 +635,9 @@ START_TEST(test_fork2_fail) END_TEST #endif /* HAVE_FORK */ +#if defined(HAVE_FORK) && HAVE_FORK == 1 +#endif /* HAVE_FORK */ + START_TEST(test_srunner) { Suite *s; @@ -873,6 +876,10 @@ void init_master_tests_lineno(int num_master_tests) { "-1", #endif /* HAVE_FORK */ +#if defined(HAVE_FORK) && HAVE_FORK==1 +/* Check Errors Tests */ +#endif /* HAVE_FORK */ + /* Core */ "-1", "-1" @@ -920,6 +927,7 @@ Suite *make_sub_suite(void) TCase *tc_limit; #if defined(HAVE_FORK) && HAVE_FORK==1 TCase *tc_messaging_and_fork; + TCase *tc_errors; #endif s = suite_create("Check Servant"); @@ -961,6 +969,7 @@ Suite *make_sub_suite(void) tc_limit = tcase_create("Limit Tests"); #if defined(HAVE_FORK) && HAVE_FORK==1 tc_messaging_and_fork = tcase_create("Msg and fork Tests"); + tc_errors = tcase_create("Check Errors Tests"); #endif /* HAVE_FORK */ suite_add_tcase (s, tc_simple);