From a864099ba77157090c4cd12817245122c163ec24 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 24 Oct 2020 21:33:44 +0300 Subject: rework Process API & tests * Add separate classes ProcessParameters & ShellParameters for Process::create() and Process::shell() methods. * Add a separate "worker" executable. It's used in tests via a fairly complicated scheme, receiving orders to execute via a shared memory region. * Add tests that utilize the Console API, reading console window's screen buffer directly, making for more reliable tests & broader coverage. --- test/unit_tests/shared/test_data.hpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/unit_tests/shared/test_data.hpp (limited to 'test/unit_tests/shared/test_data.hpp') diff --git a/test/unit_tests/shared/test_data.hpp b/test/unit_tests/shared/test_data.hpp new file mode 100644 index 0000000..0094f0b --- /dev/null +++ b/test/unit_tests/shared/test_data.hpp @@ -0,0 +1,24 @@ +// Copyright (c) 2020 Egor Tensin +// This file is part of the "winapi-common" project. +// For details, see https://github.com/egor-tensin/winapi-common. +// Distributed under the MIT License. + +#pragma once + +#include + +namespace worker { +namespace test_data { + +BOOST_STATIC_CONSTEXPR auto str = "Test output."; + +inline std::string out() { + return "stdout: " + std::string{str}; +} + +inline std::string err() { + return "stderr: " + std::string{str}; +} + +} // namespace test_data +} // namespace worker -- cgit v1.2.3