Mercurial > irccd
diff tests/src/irccdctl/cli-plugin-config/main.cpp @ 739:46a1877749ff
Tests: add irccdctl result code check
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 25 Jul 2018 21:33:00 +0200 |
parents | 199f36d4edc8 |
children | 903415e8ee2e |
line wrap: on
line diff
--- a/tests/src/irccdctl/cli-plugin-config/main.cpp Wed Jul 25 12:33:11 2018 +0200 +++ b/tests/src/irccdctl/cli-plugin-config/main.cpp Wed Jul 25 21:33:00 2018 +0200 @@ -51,17 +51,19 @@ // First, configure. No output yet { - const auto [out, err] = exec({ "plugin-config", "conf2", "verbose", "false" }); + const auto [code, out, err] = exec({ "plugin-config", "conf2", "verbose", "false" }); // no output yet. + BOOST_TEST(!code); BOOST_TEST(out.size() == 0U); BOOST_TEST(err.size() == 0U); } // Get the newly created value. { - const auto [out, err] = exec({ "plugin-config", "conf2", "verbose" }); + const auto [code, out, err] = exec({ "plugin-config", "conf2", "verbose" }); + BOOST_TEST(!code); BOOST_TEST(out.size() == 1U); BOOST_TEST(err.size() == 0U); BOOST_TEST(out[0] == "false"); @@ -72,8 +74,9 @@ { start(); - const auto [out, err] = exec({ "plugin-config", "conf1" }); + const auto [code, out, err] = exec({ "plugin-config", "conf1" }); + BOOST_TEST(!code); BOOST_TEST(out.size() == 2U); BOOST_TEST(err.size() == 0U); BOOST_TEST(out[0] == "v1 : 123");