Without fork(), this test results in exiting a unit test run.
The test is not valid without fork().
git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@768
64e312b2-a51f-0410-8e61-
82d0ca0eb02a
#endif /* HAVE_WORKING_SETENV */
#endif /* TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) */
+#ifdef HAVE_FORK
{ "Limit Tests", CK_ERROR, "Early exit with return value 1" },
+#endif /* HAVE_FORK */
{ "Limit Tests", CK_FAILURE, "Completed properly" },
{ "Limit Tests", CK_FAILURE, "Completed properly" },
END_TEST
#endif /* TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) */
+#ifdef HAVE_FORK
START_TEST(test_early_exit)
{
exit(EXIT_FAILURE);
}
END_TEST
+#endif /* HAVE_FORK */
START_TEST(test_null)
{
#endif /* TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) */
/* Limit Tests */
+#ifdef HAVE_FORK
"-1",
+#endif /* HAVE_FORK */
"-1",
"-1",
#endif /* HAVE_WORKING_SETENV */
#endif /* TIMEOUT_TESTS_ENABLED && defined(HAVE_FORK) */
+#ifdef HAVE_FORK
tcase_add_test (tc_limit, test_early_exit);
+#endif /* HAVE_FORK */
tcase_add_test (tc_limit, test_null);
tcase_add_test (tc_limit, test_null_2);