From 8a8f3cea36cba5dad6c72a2f78eac150b8007119 Mon Sep 17 00:00:00 2001 From: Guilherme Maciel Ferreira Date: Wed, 1 Feb 2012 22:32:15 -0200 Subject: [PATCH] Test: added --daemon option to ConfigurationCommandLine test case. --- test/test_configurationcommandline.cpp | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/test/test_configurationcommandline.cpp b/test/test_configurationcommandline.cpp index 60f8120..25dc474 100644 --- a/test/test_configurationcommandline.cpp +++ b/test/test_configurationcommandline.cpp @@ -32,9 +32,10 @@ BOOST_AUTO_TEST_SUITE( TestConfigurationCommandLine ) BOOST_AUTO_TEST_CASE( normal_options ) { - const int argc = 17; + const int argc = 18; char *argv[argc] = { "./pingcheck", + "--daemon", "--config-file=conf/config_file.conf", "--source-network-interface=eth0", "--nameserver=localhost", @@ -43,12 +44,12 @@ BOOST_AUTO_TEST_CASE( normal_options ) "--status-notifier-cmd=scripts/notifier_command.sh", "--link-up-interval=10", "--link-down-interval=10", - // 1st host1 + // 1st host "--host.name=www.intra2net.com", "--host.port=80", "--host.interval=4000", "--host.ping-protocol=TCP", - // 2nd host1 + // 2nd host "--host.name=www.ufsc.br", "--host.port=25", "--host.interval=1000", @@ -64,6 +65,7 @@ BOOST_AUTO_TEST_CASE( normal_options ) BOOST_CHECK_EQUAL( command_line_processed, true ); BOOST_CHECK_EQUAL( command_line_parsed, true ); + BOOST_CHECK_EQUAL( config.get_daemon(), true ); BOOST_CHECK_EQUAL( config.get_config_file_name(), "conf/config_file.conf" ); BOOST_CHECK_EQUAL( config.get_source_network_interface(), "eth0" ); BOOST_CHECK_EQUAL( config.get_nameserver(), "localhost" ); -- 1.7.1