]> granicus.if.org Git - check/commitdiff
Add new test case for Check error printouts
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Sat, 4 Jan 2014 18:33:49 +0000 (18:33 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Sat, 4 Jan 2014 18:33:49 +0000 (18:33 +0000)
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

tests/check_check_master.c
tests/check_check_sub.c

index 63d545afc515fcbdcea223f0f4c6fef447be4c7a..62e0dab14a3115b31c78560a4831a7ddb296884f 100644 (file)
@@ -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" }
 };
index 65beda5ddcc51f0dd1f10845297d35e76c5bafbf..6c2f56cc3c2383343612f8d42af8d61502501509 100644 (file)
@@ -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);