}
END_TEST
+/*
+ * This test will fail without fork, as it will result in the
+ * unit test runniner exiting early.
+ */
+#if defined(HAVE_FORK)
START_TEST(test_exit)
{
exit(1);
}
END_TEST
+#endif /* HAVE_FORK */
static Suite *make_suite (void)
{
suite_add_tcase(s, tc);
tcase_add_test (tc, test_pass);
tcase_add_test (tc, test_fail);
+#if defined(HAVE_FORK)
tcase_add_test (tc, test_exit);
-
+#endif /* HAVE_FORK */
return s;
}
t2="xRunning suite(s): Master
33%: Checks: 3, Failures: 1, Errors: 1
${lsrc}ex_output.c:17:F:Core:test_fail:0: Failure
-${lsrc}ex_output.c:21:E:Core:test_exit:0: (after this point) Early exit with return value 1"
+${lsrc}ex_output.c:26:E:Core:test_exit:0: (after this point) Early exit with return value 1"
t3="xRunning suite(s): Master
33%: Checks: 3, Failures: 1, Errors: 1
${lsrc}ex_output.c:11:P:Core:test_pass:0: Passed
${lsrc}ex_output.c:17:F:Core:test_fail:0: Failure
-${lsrc}ex_output.c:21:E:Core:test_exit:0: (after this point) Early exit with return value 1"
+${lsrc}ex_output.c:26:E:Core:test_exit:0: (after this point) Early exit with return value 1"
t4="xtest: Core:test_pass
success: Core:test_pass
test: Core:test_fail
]
test: Core:test_exit
error: Core:test_exit [
-${lsrc}ex_output.c:21: (after this point) Early exit with return value 1
+${lsrc}ex_output.c:26: (after this point) Early exit with return value 1
]"
op0=`./ex_output${EXEEXT} CK_SILENT`