From df62c3f20af1bf6d86921ba65a3c26189fde6bad Mon Sep 17 00:00:00 2001 From: brarcher Date: Sun, 22 Sep 2013 21:27:55 +0000 Subject: [PATCH] Add test for setting CK_FORK mode There was a test for setting CK_NOFORK, but not for CK_FORK. git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@776 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- tests/check_check_fork.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/check_check_fork.c b/tests/check_check_fork.c index c09fa55..6eb575c 100644 --- a/tests/check_check_fork.c +++ b/tests/check_check_fork.c @@ -95,6 +95,14 @@ END_TEST * CK_NOFORK is considered an error. */ #if defined(HAVE_FORK) +START_TEST(test_set_fork) +{ + srunner_set_fork_status(fork_dummy_sr, CK_FORK); + ck_assert_msg(srunner_fork_status(fork_dummy_sr) == CK_FORK, + "Fork status not changed correctly"); +} +END_TEST + START_TEST(test_env) { putenv((char *) "CK_FORK=no"); @@ -132,6 +140,7 @@ Suite *make_fork_suite(void) tcase_add_test(tc,test_default_fork); tcase_add_test(tc,test_set_nofork); #if defined(HAVE_FORK) + tcase_add_test(tc,test_set_fork); tcase_add_test(tc,test_env); tcase_add_test(tc,test_env_and_set); #endif /* HAVE_FORK */ -- 2.40.0