add draft version of unit test (will have to be improved for MacOS)

This commit is contained in:
Axel Kohlmeyer
2021-03-12 15:32:50 -05:00
parent 1c222286e2
commit 98013a1528
2 changed files with 28 additions and 0 deletions

View File

@ -344,6 +344,15 @@ TEST_F(SimpleCommandsTest, Units)
TEST_FAILURE(".*ERROR: Illegal units command.*", lmp->input->one("units unknown"););
}
TEST_F(SimpleCommandsTest, Plugin)
{
::testing::internal::CaptureStdout();
lmp->input->one("plugin load plugins/helloplugin.so");
auto text = ::testing::internal::GetCapturedStdout();
ASSERT_THAT(text, MatchesRegex(".*Loading plugin: Hello world command.*"));
}
TEST_F(SimpleCommandsTest, Shell)
{
if (!verbose) ::testing::internal::CaptureStdout();