Fixing up threadpool
This commit is contained in:
@@ -29,13 +29,22 @@ TEST_CASE("Basic Execution", "[forking_executor]") {
|
||||
}
|
||||
|
||||
SECTION("Large Output") {
|
||||
const std::string BIG_FILE{"/usr/share/dict/linux.words"};
|
||||
std::vector<std::string> cmd{"/usr/bin/cat", BIG_FILE};
|
||||
const std::vector<std::string> BIG_FILES{
|
||||
"/usr/share/dict/linux.words"
|
||||
, "/usr/share/dict/cracklib-small"
|
||||
, "/etc/ssh/moduli"
|
||||
};
|
||||
|
||||
auto rec = ex.runCommand(cmd);
|
||||
for (const auto & bigFile : BIG_FILES) {
|
||||
if (! std::filesystem::exists(bigFile)) continue;
|
||||
|
||||
REQUIRE(rec.rc == 0);
|
||||
REQUIRE(rec.output.size() == std::filesystem::file_size(BIG_FILE));
|
||||
REQUIRE(rec.error.empty());
|
||||
std::vector<std::string> cmd{"/usr/bin/cat", bigFile};
|
||||
|
||||
auto rec = ex.runCommand(cmd);
|
||||
|
||||
REQUIRE(rec.rc == 0);
|
||||
REQUIRE(rec.output.size() == std::filesystem::file_size(bigFile));
|
||||
REQUIRE(rec.error.empty());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user